From e7813e378cfb52bd19cb7b58030215d124d16e61 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Mon, 27 May 2024 11:35:08 +0200 Subject: [PATCH] improving project structure --- documentation/enunciate.xml | 8 +- ...ld Env for devVRE.postman_environment.json | 75 -- ...ello World Service.postman_collection.json | 692 ---------- documentation/sphinx/conf.py | 2 +- documentation/sphinx/index.rst | 38 +- .../META-INF/enunciate/d4science_docs.fmt | 1185 +++++++++++++++++ .../css/d4science_enunciate_custom.css | 26 + 7 files changed, 1230 insertions(+), 796 deletions(-) delete mode 100644 documentation/postman/Hello World Env for devVRE.postman_environment.json delete mode 100644 documentation/postman/Hello World Service.postman_collection.json create mode 100644 src/main/resources/META-INF/enunciate/d4science_docs.fmt create mode 100644 src/main/webapp/api-docs/css/d4science_enunciate_custom.css diff --git a/documentation/enunciate.xml b/documentation/enunciate.xml index aae5fa6..e1d7450 100644 --- a/documentation/enunciate.xml +++ b/documentation/enunciate.xml @@ -20,13 +20,11 @@ - - - + + \ No newline at end of file diff --git a/documentation/postman/Hello World Env for devVRE.postman_environment.json b/documentation/postman/Hello World Env for devVRE.postman_environment.json deleted file mode 100644 index 02bbf3e..0000000 --- a/documentation/postman/Hello World Env for devVRE.postman_environment.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "id": "ff7036fd-e12d-4dd7-9d0f-816bb5a0f06a", - "name": "Hello World Env for devVRE", - "values": [ - { - "key": "introspect_secret", - "value": "", - "type": "secret", - "enabled": true - }, - { - "key": "password", - "value": "", - "type": "secret", - "enabled": true - }, -{ - "key": "service_client_secret", - "value": "", - "type": "secret", - "enabled": true - }, - { - "key": "realm", - "value": "d4science", - "type": "any", - "enabled": true - }, - { - "key": "username", - "value": "luca.frosini", - "type": "default", - "enabled": true - }, - { - "key": "service_client_id", - "value": "id.d4science.org", - "type": "default", - "enabled": true - }, - { - "key": "context", - "value": "/gcube/devsec/devVRE", - "type": "default", - "enabled": true - }, - { - "key": "keycloak_url", - "value": "https://accounts.dev.d4science.org/auth", - "type": "any", - "enabled": true - }, - { - "key": "encoded_context", - "value": "%2Fgcube%2Fdevsec%2FdevVRE", - "type": "any", - "enabled": true - }, - { - "key": "client-id-user", - "value": "next.d4science.org", - "type": "default", - "enabled": true - }, - { - "key": "introspect_client", - "value": "token-exchange-dedicated", - "type": "default", - "enabled": true - } - ], - "_postman_variable_scope": "environment", - "_postman_exported_at": "2024-05-24T16:06:23.560Z", - "_postman_exported_using": "Postman/11.1.14" -} \ No newline at end of file diff --git a/documentation/postman/Hello World Service.postman_collection.json b/documentation/postman/Hello World Service.postman_collection.json deleted file mode 100644 index d843f68..0000000 --- a/documentation/postman/Hello World Service.postman_collection.json +++ /dev/null @@ -1,692 +0,0 @@ -{ - "info": { - "_postman_id": "e152bab3-7be5-4fe2-81bd-625fec76373d", - "name": "Hello World Service", - "description": "An example collection that can be used for communicating with gcube services\n\nget TOKEN and at UMA_TOKEN from url: [https://next.dev.d4science.org/group/gcube/home](https://next.dev.d4science.org/group/gcube/home)\n\nupdate the collection's variables gcube_token and uma_token", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "3092110" - }, - "item": [ - { - "name": "LOGIN", - "item": [ - { - "name": "Clear Env", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "console.log(\"executing clear script\");", - "", - "variables = [", - " 'token',", - " 'access_token',", - " 'refresh_token',", - "", - " 'uma_token',", - " 'uma_refresh',", - "", - " 'profile_token',", - " 'gcube_token',", - " 'oidc_access_token',", - " 'oidc_refresh_token',", - " 'id_token',", - "", - " 'clientId',", - "", - " 'current_username',", - " 'current_password',", - " 'current_context',", - " 'current_url-encoded-context',", - " 'current_iam-url',", - " 'current_client-id',", - " 'current_uma-token',", - " 'current_access-token',", - "", - " 'oidc_token',", - " 'oidc_access_token',", - " 'oidc_refresh_token',", - " 'uma_token',", - " 'exchanged_token'", - "", - "]", - "", - "for (var v of variables) {", - " pm.environment.unset(v);", - " pm.globals.unset(v);", - "}", - "", - " ", - "", - "", - " ", - "" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "/", - "path": [ - "" - ] - } - }, - "response": [] - }, - { - "name": "Get User Token For Context", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "postman.setEnvironmentVariable(\"oidc_access_token\", jsonData.access_token);", - "postman.setEnvironmentVariable(\"oidc_refresh_token\", jsonData.refresh_token);", - "", - "postman.setEnvironmentVariable(\"uma_token\", jsonData.access_token);", - "", - "postman.setEnvironmentVariable(\"access_token\", jsonData.access_token);", - "postman.setEnvironmentVariable(\"refresh_token\", jsonData.refresh_token);", - "" - ], - "type": "text/javascript", - "packages": {} - } - }, - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "auth": { - "type": "noauth" - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/x-www-form-urlencoded" - }, - { - "key": "X-D4Science-Context", - "value": "{{encoded_context}}" - } - ], - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "key": "client_id", - "value": "{{service_client_id}}", - "type": "text" - }, - { - "key": "username", - "value": "{{username}}", - "type": "text" - }, - { - "key": "password", - "value": "{{password}}", - "type": "text" - }, - { - "key": "grant_type", - "value": "password", - "type": "text" - }, - { - "key": "client_secret", - "value": "{{service_client_secret}}", - "type": "text" - } - ] - }, - "url": { - "raw": "{{keycloak_url}}/realms/{{realm}}/protocol/openid-connect/token", - "host": [ - "{{keycloak_url}}" - ], - "path": [ - "realms", - "{{realm}}", - "protocol", - "openid-connect", - "token" - ] - }, - "description": "Obtain UAT = user access token from a user in realm" - }, - "response": [] - }, - { - "name": "Get ClientId Token For Context", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "", - "// postman.setEnvironmentVariable(\"refresh_token\", jsonData.refresh_token);", - "// postman.setEnvironmentVariable(\"id_token\", jsonData.id_token);", - "", - "postman.setEnvironmentVariable(\"oidc_access_token\", jsonData.access_token);", - "", - "postman.setEnvironmentVariable(\"access_token\", jsonData.access_token);", - "postman.setEnvironmentVariable(\"token\", jsonData.access_token);", - "", - "" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "auth": { - "type": "noauth" - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/x-www-form-urlencoded" - }, - { - "key": "X-D4Science-Context", - "value": "{{encoded_context}}" - } - ], - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "key": "client_id", - "value": "{{service_client_id}}", - "type": "text" - }, - { - "key": "client_secret", - "value": "{{service_client_secret}}", - "type": "text" - }, - { - "key": "grant_type", - "value": "client_credentials", - "type": "text" - } - ] - }, - "url": { - "raw": "{{keycloak_url}}/realms/{{realm}}/protocol/openid-connect/token", - "host": [ - "{{keycloak_url}}" - ], - "path": [ - "realms", - "{{realm}}", - "protocol", - "openid-connect", - "token" - ] - }, - "description": "Obtain SAT (service account token)" - }, - "response": [] - }, - { - "name": "Validate Access Token", - "request": { - "auth": { - "type": "noauth" - }, - "method": "POST", - "header": [ - { - "key": "Authorization", - "value": "Basic YWxmcmVkby1pZG0tc2VydmljZS1kZXY6OTc5YmQzYmMtNWNjNC0xMWVjLWJmNjMtMDI0MmFjMTMwMDAy" - } - ], - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "key": "token", - "value": "{{access_token}}", - "type": "text" - }, - { - "key": "username\n", - "value": "{{introspect_client}}", - "type": "text", - "disabled": true - }, - { - "key": "password", - "value": "{{introspect_secret}}", - "type": "text", - "disabled": true - }, - { - "key": "client_id", - "value": "{{introspect_client}}", - "type": "text" - }, - { - "key": "client_secret", - "value": "{{introspect_secret}}", - "type": "text" - } - ] - }, - "url": { - "raw": "{{keycloak_url}}/realms/{{realm}}/protocol/openid-connect/token/introspect", - "host": [ - "{{keycloak_url}}" - ], - "path": [ - "realms", - "{{realm}}", - "protocol", - "openid-connect", - "token", - "introspect" - ] - } - }, - "response": [] - } - ] - }, - { - "name": "REST", - "item": [ - { - "name": "authorized", - "item": [ - { - "name": "legacy-token", - "item": [ - { - "name": "hello TOKEN PARAM", - "request": { - "auth": { - "type": "noauth" - }, - "method": "GET", - "header": [ - { - "key": "", - "value": "{{token}}" - } - ], - "url": { - "raw": "{{base_url}}/{{application}}/hello?gcube-token={{gcube_token}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "{{application}}", - "hello" - ], - "query": [ - { - "key": "gcube-token", - "value": "{{gcube_token}}" - } - ] - } - }, - "response": [] - }, - { - "name": "details TOKEN PARAM", - "request": { - "auth": { - "type": "noauth" - }, - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/{{application}}/details?gcube-token={{gcube_token}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "{{application}}", - "details" - ], - "query": [ - { - "key": "gcube-token", - "value": "{{gcube_token}}" - } - ] - } - }, - "response": [] - }, - { - "name": "auth org member TOKEN PARAM", - "request": { - "auth": { - "type": "noauth" - }, - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/{{application}}/auth/org_member?gcube-token={{gcube_token}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "{{application}}", - "auth", - "org_member" - ], - "query": [ - { - "key": "gcube-token", - "value": "{{gcube_token}}" - } - ] - } - }, - "response": [] - }, - { - "name": "auth member TOKEN PARAM", - "request": { - "auth": { - "type": "noauth" - }, - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/{{application}}/auth/member?gcube-token={{gcube_token}}", - "host": [ - "{{base_url}}" - ], - "path": [ - "{{application}}", - "auth", - "member" - ], - "query": [ - { - "key": "gcube-token", - "value": "{{gcube_token}}" - } - ] - } - }, - "response": [] - } - ] - }, - { - "name": "hello", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/{{application}}/hello", - "host": [ - "{{base_url}}" - ], - "path": [ - "{{application}}", - "hello" - ] - } - }, - "response": [] - }, - { - "name": "details", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/{{application}}/details", - "host": [ - "{{base_url}}" - ], - "path": [ - "{{application}}", - "details" - ] - } - }, - "response": [] - }, - { - "name": "auth org member", - "request": { - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{uma_token}}", - "type": "string" - } - ] - }, - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/{{application}}/auth/org_member", - "host": [ - "{{base_url}}" - ], - "path": [ - "{{application}}", - "auth", - "org_member" - ] - } - }, - "response": [] - }, - { - "name": "auth member", - "request": { - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{uma_token}}", - "type": "string" - } - ] - }, - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/{{application}}/auth/member", - "host": [ - "{{base_url}}" - ], - "path": [ - "{{application}}", - "auth", - "member" - ] - } - }, - "response": [] - } - ] - }, - { - "name": "No Auth Required", - "item": [ - { - "name": "guest", - "request": { - "auth": { - "type": "noauth" - }, - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/{{application}}/guest", - "host": [ - "{{base_url}}" - ], - "path": [ - "{{application}}", - "guest" - ] - } - }, - "response": [] - }, - { - "name": "404 Not Found", - "request": { - "auth": { - "type": "noauth" - }, - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/{{application}}/guest/not-found", - "host": [ - "{{base_url}}" - ], - "path": [ - "{{application}}", - "guest", - "not-found" - ] - } - }, - "response": [] - }, - { - "name": "400 Bad Request", - "request": { - "auth": { - "type": "noauth" - }, - "method": "GET", - "header": [], - "url": { - "raw": "{{base_url}}/{{application}}/guest/bad-request", - "host": [ - "{{base_url}}" - ], - "path": [ - "{{application}}", - "guest", - "bad-request" - ] - } - }, - "response": [] - }, - { - "name": "PURGE with 204 No Content", - "request": { - "auth": { - "type": "noauth" - }, - "method": "PURGE", - "header": [], - "url": { - "raw": "{{base_url}}/{{application}}/guest/test-purge", - "host": [ - "{{base_url}}" - ], - "path": [ - "{{application}}", - "guest", - "test-purge" - ] - } - }, - "response": [] - } - ] - } - ] - } - ], - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{access_token}}", - "type": "string" - } - ] - }, - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "packages": {}, - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "packages": {}, - "exec": [ - "" - ] - } - } - ], - "variable": [ - { - "key": "base_url", - "value": "http://localhost:8080", - "type": "string" - }, - { - "key": "role_name", - "value": "Member" - }, - { - "key": "application", - "value": "hello-world-service", - "type": "string" - }, - { - "key": "base_url_marco", - "value": "http://146.48.85.179:9999", - "type": "string" - }, - { - "key": "base_url_local", - "value": "http://localhost:8080", - "type": "string" - } - ] -} \ No newline at end of file diff --git a/documentation/sphinx/conf.py b/documentation/sphinx/conf.py index 5b7a2d5..64009f0 100644 --- a/documentation/sphinx/conf.py +++ b/documentation/sphinx/conf.py @@ -31,7 +31,7 @@ release = getMvnVariable("version") project = getMvnVariable("name") copyright = '2024, %s' % getMvnVariable("organization.name") -author = 'Luca Frosini (ISTI-CNR)' +author = '%s (%s)' % (getMvnVariable("developers.developer[0].name"),getMvnVariable("developers.developer[0].organization")) # -- General configuration --------------------------------------------------- diff --git a/documentation/sphinx/index.rst b/documentation/sphinx/index.rst index 7883f7a..65368c7 100644 --- a/documentation/sphinx/index.rst +++ b/documentation/sphinx/index.rst @@ -1,8 +1,8 @@ *********************************************************** -Welcome to Hello World SG4 documentation +Welcome to Resource Manager documentation *********************************************************** -Hello World SG4 is a RESTful application that exposes operations via REST-API. +Resource Manager is a RESTful application that exposes operations via REST-API. See the available `REST-API docs <../api-docs/index.html>`_. @@ -36,7 +36,6 @@ Any Background operation returns *202 Accepted*. Any operation that does not provide any content returns *204 No Content*. - The most common error statuses a client can obtain are: * **400 Bad Request** used to indicate a clients error ``_; @@ -123,7 +122,6 @@ The presented URL uses the following convention: About Safety and Idempotency properties ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - * A method is *Safe* if it does not produce any side effects. "This does not prevent an implementation from including behaviour that is potentially harmful, that is not entirely read-only, or that causes side effects while invoking a safe method" ``_; @@ -186,10 +184,11 @@ We provide the following Java Client out-of-the-box. .. code:: xml - org.gcube.service - helloworld-client - [1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT) - + org.gcube.resource-management + resource-manager-client + [1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT) + + **Methods Result** The service exposes `its methods <../api-docs/index.html>`_ using a standard naming approach. Moreover, they accept (in the case of HTTP POST/PUT methods) JSON objects. @@ -216,17 +215,9 @@ The service exposes `its methods <../api-docs/index.html>`_ using a standard nam - Service Discovery on IS ======================= -The service can be discovered in the gCore IS as gCore Endpoint with the following parameter: - -.. code:: xml - - org.gcube.service - helloworld - The service can be discovered in the Facet-Based IS as EService with the following JSON query: @@ -239,20 +230,21 @@ The service can be discovered in the Facet-Based IS as EService with the followi "@class": "IsIdentifiedBy", "target": { "@class": "SoftwareFacet", - "group": "org.gcube.service", - "name": "helloworld" + "group": "org.gcube.resource-management", + "name": "resource-manager" } } ] } - + + Service Maven Coordinates ========================= -The maven coordinates of the Hello World SG4 service are: +The maven coordinates of the Resource Manager service are: .. code:: xml - org.gcube.service - helloworld - \ No newline at end of file + org.gcube.resource-management + resource-manager + diff --git a/src/main/resources/META-INF/enunciate/d4science_docs.fmt b/src/main/resources/META-INF/enunciate/d4science_docs.fmt new file mode 100644 index 0000000..7e7c7e3 --- /dev/null +++ b/src/main/resources/META-INF/enunciate/d4science_docs.fmt @@ -0,0 +1,1185 @@ + +[#ftl] +[#-- + + Copyright © 2006-2016 Web Cohesion (info@webcohesion.com) + + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +--] +[#-- @ftlvariable name="resourceApis" type="java.util.List" --] +[#-- @ftlvariable name="serviceApis" type="java.util.List" --] +[#-- @ftlvariable name="data" type="java.util.List" --] +[#-- @ftlvariable name="downloads" type="java.util.List" --] +[#-- @ftlvariable name="title" type="java.lang.String" --] +[#-- @ftlvariable name="indexPageName" type="java.lang.String" --] +[#-- @ftlvariable name="disableMountpoint" type="java.lang.Boolean" --] +[#-- @ftlvariable name="disableResourceLinks" type="java.lang.Boolean" --] +[#-- @ftlvariable name="apiRelativePath" type="java.lang.String" --] +[#-- @ftlvariable name="cssFile" type="java.lang.String" --] +[#-- @ftlvariable name="additionalCssFiles" type="java.util.List" --] +[#-- @ftlvariable name="copyright" type="java.lang.String" --] +[#-- @ftlvariable name="apiDoc" type="java.lang.String" --] +[#-- @ftlvariable name="swaggerUI" type="com.webcohesion.enunciate.api.InterfaceDescriptionFile" --] +[#-- @ftlvariable name="favicon" type="java.lang.String" --] +[#-- @ftlvariable name="includeApplicationPath" type="java.lang.Boolean" --] +[#-- @ftlvariable name="includeDataTypesHomeIndex" type="java.lang.Boolean" --] +[#--set up the subnavigation menus--] +[#assign nav_sections = { } /] +[#if resourceApis?size > 0] + [#assign nav_sections = nav_sections + { "Resources" : "resources.html" }/] +[/#if] +[#if serviceApis?size > 0] + [#assign nav_sections = nav_sections + { "Services" : "services.html" }/] +[/#if] +[#if data?size > 0] + [#list data as syntax] + [#assign nav_sections = { syntax.label : syntax.slug + ".html" } /] + [/#list] +[/#if] +[#if downloads?size > 0] + [#assign nav_sections = nav_sections + { "Files and Libraries" : "downloads.html"} /] +[/#if] +[#--Basic boilerplate macro.--] +[#macro boilerplate title=title breadcrumbs=[{"title" : "Home", "href" : indexPageName}] pagenav=[] codeblocks=true] + + + + + + + + + ${title} + + + + + + + + [#if cssFile??] + + + [/#if] + [#list additionalCssFiles as additionalCssFile] + + [/#list] + [#if favicon??] + + + [/#if] + + + + + + +
+ D4Science + D4Science + + Don't have a D4Science account? + + Create one + + Could not find what you are looking for? + + Contact us. +
+ + + +
+
+ + +
+ + + [#nested/] + +
+
+

[#if copyright??]Copyright © ${copyright}. [/#if]Generated by Enunciate.

+
+
+ +
+
+
+ + + + + + + + + + + + + + +[/#macro] +[#--Macro that wraps its text in a deprecated tag if the element is deprecated.--] +[#macro deprecation element] + [#assign deprecated=(element?? && element.deprecated??)/] + [#if deprecated][/#if][#nested/][#if deprecated][/#if] +[/#macro] +[@file name=indexPageName] + [#assign pagenav=[]/] + [#if resourceApis?size > 0] + [#assign pagenav=pagenav + [{ "href" : "#resources", "title" : "Resources" }]/] + [/#if] + [#if serviceApis?size > 0] + [#assign pagenav=pagenav + [{ "href" : "#services", "title" : "Services" }]/] + [/#if] + [#list data as syntax] + [#assign pagenav=pagenav + [{ "href" : "#" + syntax.slug, "title" : syntax.label }]/] + [/#list] + [@boilerplate pagenav=pagenav] + [#if apiDoc??] + + [/#if] + [#if resourceApis?size > 0] + +

Resources

+ [#list resourceApis as resourceApi] + [#if downloads?size > 0] + +

+ The resources use a data model that is supported by a set of client-side libraries that are made available on the + files and libraries page. +

+ [/#if] + [#if resourceApi.wadlFile??] + +

+ There is a WADL document available that describes the resources API. +

+ [/#if] + [#if swaggerUI??] + +

+ You may also enjoy the interactive interface provided for this API by Swagger. +

+

+ Try it out! +

+ [/#if] + + + + + [#if resourceApi.includeResourceGroupName!false] + + [/#if] + + + + + + + [#list resourceApi.resourceGroups as resourceGroup] + [@processResourceGroup resourceGroup=resourceGroup/] + + [#if resourceApi.includeResourceGroupName!false] + + [/#if] + + + + + [/#list] + +
namepathmethodsdescription
[@deprecation element=resourceGroup]${resourceGroup.label}[/@deprecation]
    [#list resourceGroup.paths as path]
  • [@deprecation element=resourceGroup][#if ((includeApplicationPath!false) && (resourceGroup.relativeContextPath?has_content))]/${resourceGroup.relativeContextPath}[/#if]${path.path}[/@deprecation]
  • [/#list]
    [#list resourceGroup.paths as path]
  • [@deprecation element=resourceGroup][#list path.methods as method]${method} [/#list][/@deprecation]
  • [/#list]
[@deprecation element=resourceGroup]${resourceGroup.description!" "}[/@deprecation]
+ [/#list] + [/#if] + [#if serviceApis?size > 0] + +

Services

+ [#list serviceApis as serviceApi] + [#list serviceApi.serviceGroups as serviceGroup] + + + + + + + + + + + [#list serviceGroup.services as service] + [@processService service=service/] + + + + + [/#list] + +
Namespace ${serviceGroup.namespace!"(Default)"}[#if serviceGroup.wsdlFile??] (wsdl)[/#if]
namedescription
[@deprecation element=service]${service.label}[/@deprecation][@deprecation element=service]${service.description!" "}[/@deprecation]
+ [/#list] + [/#list] + [#if downloads?size > 0] + +

The services API is also accessible by a set of client-side libraries that can be downloaded from the files and libraries page.

+ [/#if] + [/#if] + [#if data?size > 0 && includeDataTypesHomeIndex] + +

Data Types

+ [#list data as syntax] + [@processDataSyntax syntax=syntax/] + +

${syntax.label}

+ [#list syntax.namespaces as ns] + [#if ns.types?size > 0] + + + [#if ns.uri??] + [#if ns.uri?length > 0] + + [#else] + + [/#if] + [/#if] + + + + + + + + [#list ns.types as type] + + + + + [/#list] + +
Namespace ${ns.uri}[#if ns.schemaFile??] (schema)[/#if]Default Namespace [#if ns.schemaFile??] (schema)[/#if]
typedescription
[@deprecation element=type]${type.label}[/@deprecation][@deprecation element=type]${type.description}[/@deprecation]
+ [/#if] + [/#list] + [/#list] + [#elseif data?size > 0] + [#list data as syntax] + [@processDataSyntax syntax=syntax/] + [/#list] + [/#if] + [/@boilerplate] +[/@file] +[@file name="data.html"] + [#assign pagenav=[]/] + [#list data as syntax] + [#assign pagenav=pagenav + [{ "href" : "#" + syntax.slug, "title" : syntax.label }]/] + [/#list] + [@boilerplate title=title + ": Data Types" breadcrumbs=[{"title" : "Home", "href" : indexPageName}, {"title" : "Data Types" , "href" : "data.html"}] pagenav=pagenav] +

Data Types

+ [#list data as syntax] + +

${syntax.label}

+ [#list syntax.namespaces as ns] + [#if ns.types?size > 0] + + + [#if ns.uri??] + [#if ns.uri?length > 0] + + [#else] + + [/#if] + [/#if] + + + + + + + + [#list ns.types as type] + + + + + [/#list] + +
Namespace ${ns.uri}[#if ns.schemaFile??] (schema)[/#if]Default Namespace [#if ns.schemaFile??] (schema)[/#if]
typedescription
[@deprecation element=type]${type.label}[/@deprecation][@deprecation element=type]${type.description}[/@deprecation]
+ [/#if] + [/#list] + [/#list] + [/@boilerplate] +[/@file] +[#if downloads?size > 0] + [@file name="downloads.html"] + [#assign pagenav=[]/] + [#list downloads as download] + [#assign pagenav=pagenav + [{ "href" : "#" + download.slug, "title" : download.name }]/] + [/#list] + [@boilerplate title=title + ": Files and Libraries" breadcrumbs=[{"title" : "Home", "href" : indexPageName}, { "title" : "Files and Libraries" , "href" : "downloads.html"}] codeblocks=true pagenav=pagenav] +

Files and Libraries

+ + [#list downloads as download] +

${download.name}

+ [#if download.created??] +

Created ${download.created?date?string.long}

+ [/#if] + [#if download.artifactId??] +
+ [#if download.groupId??] +
groupId
+
${download.groupId}
+ [/#if] + [#if download.artifactId??] +
artifactId
+
${download.artifactId}
+ [/#if] + [#if download.version??] +
version
+
${download.version}
+
+ [/#if] + [/#if] + [#if download.description??] +

${download.description}

+ [/#if] + + + + + + + + + + + [#list download.files as file] + + + + + + [/#list] + +
Files
namesizedescription
${file.name}${file.size}${file.description!download.description!" "}
+ [/#list] + [/@boilerplate] + [/@file] +[/#if] +[#if resourceApis?size > 0] + [@file name="resources.html"] + [@boilerplate title=title + ": Resources" breadcrumbs=[{"title" : "Home", "href" : indexPageName}, {"title" : "Resources" , "href" : "resources.html"}]] +

Resources

+ + [#list resourceApis as resourceApi] + [#if downloads?size > 0] +

+ The resources use a data model that is supported by a set of client-side libraries that are made available on the + files and libraries page. +

+ [/#if] + [#if resourceApi.wadlFile??] +

+ There is a WADL document available that describes the resources API. +

+ [/#if] + [#if swaggerUI??] +

+ You may also enjoy the interactive interface provided for this API by Swagger. +

+

+ Try it out! +

+ [/#if] + + + + [#if resourceApi.includeResourceGroupName!false] + + [/#if] + + + + + + + [#list resourceApi.resourceGroups as resourceGroup] + + [#if resourceApi.includeResourceGroupName!false] + + [/#if] + + + + + [/#list] + +
namepathmethodsdescription
[@deprecation element=resourceGroup]${resourceGroup.label}[/@deprecation]
    [#list resourceGroup.paths as path]
  • [@deprecation element=resourceGroup][#if ((includeApplicationPath!false) && (resourceGroup.relativeContextPath?has_content))]/${resourceGroup.relativeContextPath}[/#if]${path.path}[/@deprecation]
  • [/#list]
    [#list resourceGroup.paths as path]
  • [@deprecation element=resourceGroup][#list path.methods as method]${method} [/#list][/@deprecation]
  • [/#list]
[@deprecation element=resourceGroup]${resourceGroup.description!" "}[/@deprecation]
+ [/#list] + [/@boilerplate] + [/@file] +[/#if] +[#if serviceApis?size > 0] + [@file name="services.html"] + [@boilerplate title=title + ": Services" breadcrumbs=[{"title" : "Home", "href" : indexPageName}, {"title" : "Services" , "href" : "services.html"}]] +

Services

+ [#list serviceApis as serviceApi] + [#list serviceApi.serviceGroups as serviceGroup] + + + + + + + + + + + [#list serviceGroup.services as service] + + + + + [/#list] + +
Namespace ${serviceGroup.namespace}[#if serviceGroup.wsdlFile??] (wsdl)[/#if]
namedescription
[@deprecation element=service]${service.label}[/@deprecation][@deprecation element=service]${service.description!" "}[/@deprecation]
+ [/#list] + [/#list] + [#if downloads?size > 0] + +

The services API is also accessible by a set of client-side libraries that can be downloaded from the files and libraries page.

+ [/#if] + [/@boilerplate] + [/@file] +[/#if] +[#macro processResourceGroup resourceGroup] + [#assign pagenav=[]/] + [#list resourceGroup.resources as resource] + [#list resource.methods as method] + [#assign path=resource.path/] + [#if ((includeApplicationPath!false) && (resourceGroup.relativeContextPath?has_content))] + [#assign path="/" + resourceGroup.relativeContextPath + resource.path/] + [/#if] + [#assign pagenav=pagenav + [{ "href" : "#" + method.slug, "title" : method.label + " " + path }]/] + [/#list] + [/#list] + [#-- @ftlvariable name="resourceGroup" type="com.webcohesion.enunciate.api.resources.ResourceGroup" --] + [@file name=resourceGroup.slug + ".html"] + [@boilerplate title=title + ": " + resourceGroup.label breadcrumbs=[{"title" : "Home", "href" : indexPageName}, {"title" : "Resources" , "href" : "resources.html"}, {"title" : resourceGroup.label , "href" : resourceGroup.slug + ".html"}] pagenav=pagenav] +

${resourceGroup.label} Resource

+ [#if resourceGroup.description??] + +

${resourceGroup.description}

+ [/#if] + [#list resourceGroup.resources as resource] + [#if resource.since?? || resource.version?? || resource.seeAlso??] + +
+ [#if resource.since??] +
Available Since
+
${resource.since}
+ [/#if] + [#if resource.version??] +
Version
+
${resource.version}
+ [/#if] + [#if resource.seeAlso??] + [#list resource.seeAlso as seeAlso] +
See Also
+
${seeAlso}
+ [/#list] + [/#if] +
+ [/#if] + [#list resource.methods as method] + +
+

${method.label} [#if ((includeApplicationPath!false) && (resourceGroup.relativeContextPath?has_content))]/${resourceGroup.relativeContextPath}[/#if]${resource.path}[#if !disableResourceLinks!false] [/#if]

+ [#if resourceGroup.deprecated?? || method.deprecated??] + +
This method has been deprecated. [#if method.deprecated??] ${method.deprecated!""}[#else] ${resource.deprecated!""}[/#if]
+ [/#if] + [#if method.description??] + +

${method.description}

+ [/#if] + [#-- would be nice to enable a "Try it out" link to Swagger. See https://github.com/swagger-api/swagger-spec/issues/239 + [#if swaggerUI??] + +

Try it out!

+ [/#if] + --] + [#assign securityRoles=method.securityRoles![]/] + [#if (method.since?? || method.version?? || method.seeAlso?? || securityRoles?size > 0)] + +
+ [#if method.since??] +
Available Since
+
${method.since}
+ [/#if] + [#if method.version??] +
Version
+
${method.version}
+ [/#if] + [#if securityRoles?size > 0] +
Security Roles Allowed
+
[#list securityRoles as role]${role}[#if role_has_next], [/#if][/#list]
+ [/#if] + [#if method.seeAlso??] + [#list method.seeAlso as seeAlso] +
See Also
+
${seeAlso}
+ [/#list] + [/#if] +
+ [/#if] + [#if method.parameters?size > 0] + + + + + + + + + [#assign includeDefault=method.includeDefaultParameterValues/] + [#if includeDefault] + + [/#if] + [#assign includeConstraints=method.hasParameterConstraints/] + [#if includeConstraints] + + [/#if] + [#assign includeMultiplicity=method.hasParameterMultiplicity/] + [#if includeMultiplicity] + + [/#if] + + + + [#list method.parameters as parameter] + + + + + [#if includeDefault] + + [/#if] + [#if includeConstraints] + + [/#if] + [#if includeMultiplicity] + + [/#if] + + [/#list] + +
Request Parameters
nametypedescriptiondefaultconstraintsmultivalued
${parameter.name}${parameter.typeLabel}${parameter.description!" "}${parameter.defaultValue!" "}${parameter.constraints!" "}${parameter.multivalued?string("yes", "no")}
+ [/#if] + [#if method.requestEntity??] + + + + + + + + [#if method.requestEntity.description??] + + [/#if] + + + + [#list method.requestEntity.mediaTypes as io] + + + + [#if io_index = 0 && method.requestEntity.description??] + 1] rowspan="${method.requestEntity.mediaTypes?size}" class="multi-row-description"[/#if]>${method.requestEntity.description} + [/#if] + + [/#list] + +
Request Body
media typedata typedescription
${io.mediaType}[@referenceDataType referenceType=io.dataType!{"label" : "(custom)"}/][#if io.syntax??] (${io.syntax})[/#if]
+ [/#if] + [#if method.responseCodes?size > 0] + + + + + + + + [#assign hasExpectedTypes=false/] + [#list method.responseCodes as responseCode] + [#if responseCode.mediaTypes?size > 0] + [#assign hasExpectedTypes=true/] + [/#if] + [/#list] + [#if hasExpectedTypes] + + [/#if] + + + + [#list method.responseCodes as responseCode] + + + + [#if hasExpectedTypes] + + [/#if] + + [/#list] + +
Response Codes
codeconditiontype
${responseCode.code}${responseCode.condition!""}
    [#list responseCode.mediaTypes as io]
  • [@referenceDataType referenceType=io.dataType!{"label" : "(custom)"}/][#if io.syntax??] (${io.syntax})[/#if]
  • [/#list]
+ [/#if] + [#if method.responseEntity??] + + + + + + + + [#if method.responseEntity.description??] + + [/#if] + + + + [#list method.responseEntity.mediaTypes as io] + + + + [#if io_index = 0 && method.responseEntity.description??] + 1] rowspan="${method.responseEntity.mediaTypes?size}" class="multi-row-description"[/#if]>${method.responseEntity.description} + [/#if] + + [/#list] + +
Response Body
media typedata typedescription
${io.mediaType}[@referenceDataType referenceType=io.dataType!{"label" : "(custom)"}/][#if io.syntax??] (${io.syntax})[/#if]
+ [/#if] + [#if method.warnings?size > 0] + + + + + + + + + + + [#list method.warnings as responseCode] + + + + + [/#list] + +
Response Warnings
codecondition
${responseCode.code}${responseCode.condition!""}
+ [/#if] + [#if method.responseHeaders?size > 0] + + + + + + + + + + + [#list method.responseHeaders as header] + + + + + [/#list] + +
Response Headers
namedescription
${header.name}${header.description!" "}
+ + [/#if] + [#if method.example??] +

Example

+ +
+
+
+
Request
+
+${method.example.requestHeaders?xhtml}
+            [#if method.example.requestLang??]
+                
+${method.example.requestBody?xhtml}
+                
+            [/#if]
+              
+
+
+
Response
+
+${method.example.responseHeaders?xhtml}
+            [#if method.example.responseLang??]
+                
+${method.example.responseBody?xhtml}
+                
+            [/#if]
+              
+
+
+
+ [/#if] +
+ [/#list] + [/#list] + [/@boilerplate] + [/@file] +[/#macro] +[#macro processService service] + [#assign pagenav=[]/] + [#list service.operations as operation] + [#assign pagenav=pagenav + [{ "href" : "#" + operation.slug, "title" : operation.name }]/] + [/#list] + [#-- @ftlvariable name="service" type="com.webcohesion.enunciate.api.services.Service" --] + [@file name=service.slug + ".html"] + [@boilerplate title=title + ": " + service.label breadcrumbs=[{"title" : "Home", "href" : indexPageName}, {"title" : service.label , "href" : service.slug + ".html"}] pagenav=pagenav] +

${service.label} Service

+ [#if service.deprecated??] + +
This service has been deprecated. ${service.deprecated}
+ [/#if] + [#if service.description??] + +

${service.description}

+ [/#if] + +
+ [#if service.namespace?? && service.namespace?length > 0] +
Namespace
+
${service.namespace}
+ [/#if] + [#if service.group.wsdlFile??] +
WSDL
+
${service.group.wsdlFile.href}
+ [/#if] + [#if service.path??] +
Path
+
${service.path}
+ [/#if] + [#if service.since??] +
Available Since
+
${service.since}
+ [/#if] + [#if service.version??] +
Version
+
${service.version}
+ [/#if] + [#if service.seeAlso??] + [#list service.seeAlso as seeAlso] +
See Also
+
${seeAlso}
+ [/#list] + [/#if] +
+ [#list service.operations as operation] + +

${operation.name} Operation

+ [#if operation.deprecated??] + +
This method has been deprecated. ${operation.deprecated}
+ [/#if] + [#if operation.description??] + +

${operation.description}

+ [/#if] + [#if (operation.since?? || operation.version?? || operation.seeAlso??)] + +
+ [#if operation.since??] +
Available Since
+
${operation.since}
+ [/#if] + [#if operation.version??] +
Version
+
${operation.version}
+ [/#if] + [#if operation.seeAlso??] + [#list operation.seeAlso as seeAlso] +
See Also
+
${seeAlso}
+ [/#list] + [/#if] +
+ [/#if] + [#if operation.inputParameters?size > 0] + + + + + + + + + + + + [#list operation.inputParameters as parameter] + + + + + + [/#list] + +
Input Parameters
nametypedescription
${parameter.name}[@referenceDataType referenceType=parameter.dataType/]${parameter.description!" "}
+ [/#if] + [#if operation.httpRequestHeaders?size > 0] + + + + + + + + + + + + [#list operation.httpRequestHeaders as parameter] + + + + + + [/#list] + +
HTTP Request Headers
nametypedescription
${parameter.name}[@referenceDataType referenceType=parameter.dataType/]${parameter.description!" "}
+ [/#if] + [#if operation.outputParameters?size > 0] + + + + + + + + + + + + [#list operation.outputParameters as parameter] + + + + + + [/#list] + +
Output Parameters
nametypedescription
${parameter.name}[@referenceDataType referenceType=parameter.dataType/]${parameter.description!" "}
+ [/#if] + [#if operation.returnType??] + + + + + + + + + + + + + + + +
Return Value
typedescription
[@referenceDataType referenceType=operation.returnType/]${operation.returnDescription!" "}
+ [/#if] + [#if operation.faults?size > 0] + + + + + + + + + + + + [#list operation.faults as fault] + + + + + + [/#list] + +
Faults
nametypeconditions
${fault.name}[@referenceDataType referenceType=fault.dataType/]${fault.conditions!" "}
+ [/#if] + [/#list] + [/@boilerplate] + [/@file] +[/#macro] +[#macro processDataSyntax syntax] + [#-- @ftlvariable name="syntax" type="com.webcohesion.enunciate.api.datatype.Syntax" --] + [@file name=syntax.slug + ".html"] + [@boilerplate title=title + ": " + syntax.label breadcrumbs=[{"title" : "Home", "href" : indexPageName}, {"title" : syntax.label , "href" : syntax.slug + ".html"} ]] +

${syntax.label}

+ [#list syntax.namespaces as ns] + [#if ns.types?size > 0] + + + [#if ns.uri??] + [#if ns.uri?length > 0] + + [#else] + + [/#if] + [/#if] + + + + + + + + [#list ns.types as type] + [@processDataType type=type/] + + + + + [/#list] + +
Namespace ${ns.uri}[#if ns.schemaFile??] (schema)[/#if]Default Namespace [#if ns.schemaFile??] (schema)[/#if]
typedescription
[@deprecation element=type]${type.label}[/@deprecation][@deprecation element=type]${type.description}[/@deprecation]
+ [/#if] + [/#list] + [/@boilerplate] + [/@file] +[/#macro] +[#macro processDataType type] + [#-- @ftlvariable name="type" type="com.webcohesion.enunciate.api.datatype.DataType" --] + [#assign pagenav=[]/] + [#if type.values??] + [#list type.values as value] + [#assign pagenav=pagenav + [{ "href" : "#" + value.value, "title" : value.value }]/] + [/#list] + [/#if] + [@file name=type.slug + ".html"] + [@boilerplate title=title + ": " + type.label breadcrumbs=[{"title" : "Home", "href" : indexPageName}, {"title" : type.syntax.label , "href" : type.syntax.slug + ".html"}, {"title" : type.label , "href" : type.slug + ".html"} ] pagenav=pagenav codeblocks=true] +

${type.label} Data Type

+ [#if type.deprecated??] + +
This data type has been deprecated. ${type.deprecated}
+ [/#if] + [#if type.description??] + +

${type.description}

+ [/#if] + +
+ [#if type.namespace.uri??] +
Namespace
+ [#if type.namespace.uri?length > 0] +
${type.namespace.uri}
+ [#else] +
(Default)
+ [/#if] + [/#if] + [#if type.namespace.schemaFile??] +
Schema
+
${type.namespace.schemaFile.href}
+ [/#if] + [#if type.since??] +
Available Since
+
${type.since}
+ [/#if] + [#if type.version??] +
Version
+
${type.version}
+ [/#if] + [#if type.abstract] +
Abstract Type
+
+ [/#if] + [#if type.subtypes??] +
Subtypes
+
[#list type.subtypes as subtype][#if subtype.slug??]${subtype.label}[#else]${subtype.label}[/#if][#if subtype_has_next], [/#if][/#list]
+ [/#if] + [#if type.interfaces??] +
Implemented Interfaces
+
[#list type.interfaces as iface]${iface.label}[#if iface_has_next], [/#if][/#list]
+ [/#if] + [#if type.seeAlso??] + [#list type.seeAlso as seeAlso] +
See Also
+
${seeAlso}
+ [/#list] + [/#if] +
+ [#if type.values??] + + + + + + + + + + + [#list type.values as value] + + + + + [/#list] + +
Values
valuedescription
${value.value}[#if value.since??]since ${value.since} [/#if]${value.description!" "}
+ [/#if] + [#if type.properties??] + + + + + + + + [#list type.propertyMetadata?keys as meta] + + [/#list] + + + + + [#list type.properties as property] + + + + [#list type.propertyMetadata?keys as meta] + + [/#list] + + + [/#list] + + [#if type.supertypes??] + [#list type.supertypes as supertype] + [#if supertype.value?? && supertype.value.properties?? && supertype.value.properties?size > 0] + + + + + [#list supertype.value.properties as superProperty] + + + + [#list type.propertyMetadata?keys as meta] + + [/#list] + + + [/#list] + + [/#if] + [/#list] + [/#if] +
Properties
namedata type${type.propertyMetadata[meta]}description
[@deprecation element=property]${property.name}[/@deprecation][@deprecation element=property][@referenceDataType referenceType=property.dataType/][/@deprecation][@deprecation element=property][@printPropertyMetadata property=property meta=meta/][/@deprecation][@deprecation element=property][#if property.since??]since ${property.since} [/#if]${property.description!" "}[/@deprecation]
Properties inherited from ${supertype.label}
${superProperty.name}[@referenceDataType referenceType=superProperty.dataType/][@printPropertyMetadata property=superProperty meta=meta/][#if superProperty.since??]since ${superProperty.since} [/#if]${superProperty.description!" "}
+ [/#if] + [#if type.example??] + +

Example

+ [#if type.abstract && type.subtypes?? ] + +
This data type is abstract. The example below may be incomplete. More accurate examples can be found in subtypes pages.
+ [/#if] + +
${type.example.body?xhtml}
+ [/#if] + [/@boilerplate] + [/@file] +[/#macro] +[#macro referenceDataType referenceType] +[#-- @ftlvariable name="type" type="com.webcohesion.enunciate.api.datatype.DataTypeReference" --] +[#if referenceType.containers??][#list referenceType.containers as container]${container?string} of [/#list][/#if][#if referenceType.slug??][/#if]${referenceType.label!"(custom)"}[#if referenceType.slug??][/#if] +[/#macro] +[#macro printPropertyMetadata property meta] + [#assign metaValue=property[meta]!({ "structure" : true })/] + [#if metaValue?is_hash && metaValue.structure!false] +[#if metaValue.href??][/#if][#if metaValue.title??][/#if]${metaValue.value!" "}[#if metaValue.title??][/#if][#if metaValue.href??][/#if] + [#else] +${metaValue} + [/#if] +[/#macro] \ No newline at end of file diff --git a/src/main/webapp/api-docs/css/d4science_enunciate_custom.css b/src/main/webapp/api-docs/css/d4science_enunciate_custom.css new file mode 100644 index 0000000..48a9abd --- /dev/null +++ b/src/main/webapp/api-docs/css/d4science_enunciate_custom.css @@ -0,0 +1,26 @@ +.d4science_intro { + top: 0; + z-index: 2000; + position: fixed; + display: block ruby; + padding: 10px; + background: white; + width: 100%; + height: 100px; +} + +.navbar-fixed-top { + top: 100px !important; +} + +.sidebar { + top: 160px !important; +} + +.navbar { + margin-bottom: 40px !important; +} + +.main { + top: 90px; +} \ No newline at end of file