Added Enunciate to automatically create REST APIs documentation
This commit is contained in:
parent
36977e1c16
commit
8f6a7397a9
|
@ -8,6 +8,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
||||||
- Added support to manage configurations [#22658]
|
- Added support to manage configurations [#22658]
|
||||||
- Migrated service to SecretManagerProvider [#22871]
|
- Migrated service to SecretManagerProvider [#22871]
|
||||||
- Migrated to ServiceClass corresponding to Maven groupId
|
- Migrated to ServiceClass corresponding to Maven groupId
|
||||||
|
- Added Enunciate to automatically create REST APIs documentation [#23096]
|
||||||
|
|
||||||
## [v2.1.0]
|
## [v2.1.0]
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<enunciate
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:noNamespaceSchemaLocation="http://enunciate.webcohesion.com/schemas/enunciate-2.14.0.xsd">
|
||||||
|
<api-classes>
|
||||||
|
<!-- Use patterns to exclude classes...
|
||||||
|
e.g. for URI-Resolver
|
||||||
|
<exclude pattern="org.gcube.datatransfer.resolver.services.UriResolverDocs" />
|
||||||
|
<exclude pattern="org.gcube.datatransfer.resolver.services.UriResolverIndex" />
|
||||||
|
<exclude pattern="org.gcube.datatransfer.resolver.services.UriResolverInfo" />
|
||||||
|
<exclude pattern="org.gcube.datatransfer.resolver.services.tobackward.BackCatalogueResolver" />
|
||||||
|
<exclude pattern="org.gcube.datatransfer.resolver.services.tobackward.BackUriResolverCatalogueResolver" />
|
||||||
|
-->
|
||||||
|
</api-classes>
|
||||||
|
<modules>
|
||||||
|
<gwt-json-overlay disabled="true " />
|
||||||
|
<php-json-client disabled="true" />
|
||||||
|
<ruby-json-client disabled="true" />
|
||||||
|
<java-json-client disabled="true" />
|
||||||
|
<javascript-client disabled="true" />
|
||||||
|
<docs docsDir="${project.build.directory}" docsSubdir="docs" />
|
||||||
|
</modules>
|
||||||
|
</enunciate>
|
|
@ -5,4 +5,5 @@
|
||||||
<group>${project.groupId}</group>
|
<group>${project.groupId}</group>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<description>${project.description}</description>
|
<description>${project.description}</description>
|
||||||
|
<exclude>/docs/*</exclude>
|
||||||
</application>
|
</application>
|
69
pom.xml
69
pom.xml
|
@ -22,6 +22,7 @@
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<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>
|
<webappDirectory>${project.basedir}${file.separator}src${file.separator}main${file.separator}webapp${file.separator}WEB-INF</webappDirectory>
|
||||||
<serviceClass>data-catalogue</serviceClass>
|
<serviceClass>data-catalogue</serviceClass>
|
||||||
|
<enunciate.version>2.14.0</enunciate.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<scm>
|
<scm>
|
||||||
|
@ -97,8 +98,6 @@
|
||||||
<artifactId>resource-registry-publisher</artifactId>
|
<artifactId>resource-registry-publisher</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.data-catalogue</groupId>
|
<groupId>org.gcube.data-catalogue</groupId>
|
||||||
<artifactId>gcubedatacatalogue-metadata-discovery</artifactId>
|
<artifactId>gcubedatacatalogue-metadata-discovery</artifactId>
|
||||||
|
@ -208,6 +207,22 @@
|
||||||
<artifactId>gcube-jackson-databind</artifactId>
|
<artifactId>gcube-jackson-databind</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Required for Enunciate plugin -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.geotoolkit</groupId>
|
||||||
|
<artifactId>geotk-xml-base</artifactId>
|
||||||
|
<version>3.20-geoapi-3.0</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>javax.servlet-api</artifactId>
|
||||||
|
<version>3.1.0</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<!-- END Required for Enunciate plugin -->
|
||||||
|
|
||||||
|
|
||||||
<!-- Test libraries -->
|
<!-- Test libraries -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
|
@ -222,4 +237,54 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<!-- Enunciate Maven plugin -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.webcohesion.enunciate</groupId>
|
||||||
|
<artifactId>enunciate-maven-plugin</artifactId>
|
||||||
|
<version>${enunciate.version}</version>
|
||||||
|
<configuration>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>assemble</id>
|
||||||
|
<goals>
|
||||||
|
<goal>assemble</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<!-- Copy Enunciate Documentation from your-application/docs into your war -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>copy-enunciate-docs</id>
|
||||||
|
<phase>process-resources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-resources</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>target</outputDirectory>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<targetPath>${project.build.directory}/${project.artifactId}-${project.version}/docs</targetPath>
|
||||||
|
<directory>${project.build.directory}/docs</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
|
||||||
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
Loading…
Reference in New Issue