completed v5.1 support with swagger v3.x

This commit is contained in:
Brian Long 2023-06-16 09:27:25 -04:00
parent 27fb71e636
commit a11aced4e3
3 changed files with 54 additions and 24 deletions

11
.gitignore vendored
View File

@ -1,10 +1,6 @@
# Maven # Maven
pom.xml.versionsBackup
target target
pom.xml.versionsBackup
# Maven Invoker
build.log
invoker-reports
# Eclipse # Eclipse
.project .project
@ -13,8 +9,9 @@ invoker-reports
# Visual Studio Code # Visual Studio Code
.factorypath .factorypath
.vscode
# Swagger Codegen # Swagger Codegen
src/gen src/gen
.swagger-codegen .swagger*
.swagger-codegen-ignore

47
pom.xml
View File

@ -52,11 +52,26 @@
</properties> </properties>
<dependencies> <dependencies>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.6.11</version>
</dependency>
<dependency> <dependency>
<groupId>io.swagger.core.v3</groupId> <groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId> <artifactId>swagger-annotations</artifactId>
<version>2.2.11</version> <version>2.2.11</version>
</dependency> </dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.7</version>
</dependency>
<dependency> <dependency>
<groupId>jakarta.ws.rs</groupId> <groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId> <artifactId>jakarta.ws.rs-api</artifactId>
@ -139,12 +154,22 @@
<inputSpec>${project.build.directory}/dependency/definitions/alfresco-core.yaml</inputSpec> <inputSpec>${project.build.directory}/dependency/definitions/alfresco-core.yaml</inputSpec>
</configuration> </configuration>
</execution> </execution>
<execution>
<id>swagger-workflow-codegen</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.build.directory}/dependency/definitions/alfresco-workflow.yaml</inputSpec>
</configuration>
</execution>
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>
<groupId>com.inteligr8</groupId> <groupId>com.inteligr8</groupId>
<artifactId>regex-maven-plugin</artifactId> <artifactId>regex-maven-plugin</artifactId>
<version>1.0.4</version> <version>1.0.5</version>
<executions> <executions>
<execution> <execution>
<id>fix-baseUrl</id> <id>fix-baseUrl</id>
@ -166,24 +191,12 @@
<replacement></replacement> <replacement></replacement>
</regex> </regex>
<regex> <regex>
<pattern>(\*\*Core API\*\*[^@]*)@Path\("/"\)([^@]*)@Api\(value = "/"</pattern> <pattern>(\* Alfresco Core REST API[^@]*)@Path\("/"\)</pattern>
<replacement>$1@Path("/api/-default-/public/alfresco/versions/1")$2@Api(value = "/api/-default-/public/alfresco/versions/1"</replacement> <replacement>$1@Path("/api/-default-/public/alfresco/versions/1")</replacement>
</regex> </regex>
<regex> <regex>
<pattern>(\*\*Search API\*\*[^@]*)@Path\("/"\)([^@]*)@Api\(value = "/"</pattern> <pattern>(\* Alfresco Workflow REST API[^@]*)@Path\("/"\)</pattern>
<replacement>$1@Path("/api/-default-/public/search/versions/1")$2@Api(value = "/api/-default-/public/search/versions/1"</replacement> <replacement>$1@Path("/api/-default-/public/workflow/versions/1")</replacement>
</regex>
<regex>
<pattern>(\*\*Model API\*\*[^@]*)@Path\("/"\)([^@]*)@Api\(value = "/"</pattern>
<replacement>$1@Path("/api/-default-/public/alfresco/versions/1")$2@Api(value = "/api/-default-/public/alfresco/versions/1"</replacement>
</regex>
<regex>
<pattern>(\*\*Authentication API\*\*[^@]*)@Path\("/"\)([^@]*)@Api\(value = "/"</pattern>
<replacement>$1@Path("/api/-default-/public/authentication/versions/1")$2@Api(value = "/api/-default-/public/authentication/versions/1"</replacement>
</regex>
<regex>
<pattern>(\*\*Discovery API\*\*[^@]*)@Path\("/"\)([^@]*)@Api\(value = "/"</pattern>
<replacement>$1@Path("/api")$2@Api(value = "/api"</replacement>
</regex> </regex>
</regexes> </regexes>
</configuration> </configuration>

View File

@ -15,12 +15,16 @@
package com.inteligr8.alfresco.acs; package com.inteligr8.alfresco.acs;
import com.inteligr8.alfresco.acs.api.CommentsApi; import com.inteligr8.alfresco.acs.api.CommentsApi;
import com.inteligr8.alfresco.acs.api.DeploymentsApi;
import com.inteligr8.alfresco.acs.api.FavoritesApi; import com.inteligr8.alfresco.acs.api.FavoritesApi;
import com.inteligr8.alfresco.acs.api.NetworksApi; import com.inteligr8.alfresco.acs.api.NetworksApi;
import com.inteligr8.alfresco.acs.api.PeopleApi; import com.inteligr8.alfresco.acs.api.PeopleApi;
import com.inteligr8.alfresco.acs.api.ProcessDefinitionsApi;
import com.inteligr8.alfresco.acs.api.ProcessesApi;
import com.inteligr8.alfresco.acs.api.RatingsApi; import com.inteligr8.alfresco.acs.api.RatingsApi;
import com.inteligr8.alfresco.acs.api.SitesApi; import com.inteligr8.alfresco.acs.api.SitesApi;
import com.inteligr8.alfresco.acs.api.TagsApi; import com.inteligr8.alfresco.acs.api.TagsApi;
import com.inteligr8.alfresco.acs.api.TasksApi;
import com.inteligr8.alfresco.acs.api.V0Api; import com.inteligr8.alfresco.acs.api.V0Api;
/** /**
@ -37,6 +41,10 @@ public interface AcsPublicRestApi {
return this.getApi(CommentsApi.class); return this.getApi(CommentsApi.class);
} }
default DeploymentsApi getDeploymentsApi() {
return this.getApi(DeploymentsApi.class);
}
default FavoritesApi getFavoritesApi() { default FavoritesApi getFavoritesApi() {
return this.getApi(FavoritesApi.class); return this.getApi(FavoritesApi.class);
} }
@ -48,6 +56,14 @@ public interface AcsPublicRestApi {
default PeopleApi getPeopleApi() { default PeopleApi getPeopleApi() {
return this.getApi(PeopleApi.class); return this.getApi(PeopleApi.class);
} }
default ProcessDefinitionsApi getProcessDefinitionApi() {
return this.getApi(ProcessDefinitionsApi.class);
}
default ProcessesApi getProcessesApi() {
return this.getApi(ProcessesApi.class);
}
default RatingsApi getRatingsApi() { default RatingsApi getRatingsApi() {
return this.getApi(RatingsApi.class); return this.getApi(RatingsApi.class);
@ -60,6 +76,10 @@ public interface AcsPublicRestApi {
default TagsApi getTagsApi() { default TagsApi getTagsApi() {
return this.getApi(TagsApi.class); return this.getApi(TagsApi.class);
} }
default TasksApi getTasksApi() {
return this.getApi(TasksApi.class);
}
default V0Api getV0Api() { default V0Api getV0Api() {
return this.getApi(V0Api.class); return this.getApi(V0Api.class);