Enhancing generated docs

This commit is contained in:
Luca Frosini 2022-04-11 14:15:06 +02:00
parent 093aba2018
commit 17714db2a7
2 changed files with 22 additions and 1 deletions

15
pom.xml
View File

@ -21,6 +21,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<webappDirectory>${project.basedir}${file.separator}src${file.separator}main${file.separator}webapp${file.separator}WEB-INF</webappDirectory>
<enunciate.version>2.14.0</enunciate.version>
</properties>
<scm>
@ -215,6 +216,18 @@
</dependency>
<!-- Required for Enunciate plugin -->
<dependency>
<groupId>com.webcohesion.enunciate</groupId>
<artifactId>enunciate-core-annotations</artifactId>
<version>${enunciate.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.webcohesion.enunciate</groupId>
<artifactId>enunciate-rt-util</artifactId>
<version>${enunciate.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.geotoolkit</groupId>
<artifactId>geotk-xml-base</artifactId>
@ -252,7 +265,7 @@
<plugin>
<groupId>com.webcohesion.enunciate</groupId>
<artifactId>enunciate-maven-plugin</artifactId>
<version>2.14.0</version>
<version>${enunciate.version}</version>
<executions>
<execution>
<id>assemble</id>

View File

@ -37,6 +37,9 @@ import org.gcube.gcat.persistence.ckan.CKANUserCache;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.webcohesion.enunciate.metadata.rs.ResponseCode;
import com.webcohesion.enunciate.metadata.rs.StatusCodes;
/**
* @author Luca Frosini (ISTI - CNR)
*/
@ -97,6 +100,11 @@ public class Configuration extends BaseREST implements org.gcube.gcat.api.interf
@Produces(GCatConstants.APPLICATION_JSON_CHARSET_UTF_8)
@Override
@AuthorizationControl(allowedRoles={Role.CATALOGUE_MANAGER}, exception=NotAuthorizedException.class)
@StatusCodes ({
@ResponseCode(code = 200, condition = "Object successfully created"),
@ResponseCode(code = 401, condition = "Only Catalogue-Managers can invoke such a method"),
@ResponseCode(code = 500, condition = "Error while persisting configuration on the information system"),
})
public Response create(String json) throws WebServiceException {
try {
ServiceCatalogueConfiguration catalogueConfiguration = ServiceCatalogueConfiguration.getServiceCatalogueConfiguration(json);