From 0723f45ce227e914e958e5ce1c511dc59b23c593 Mon Sep 17 00:00:00 2001 From: Anuda Weerasinghe Date: Mon, 10 Oct 2022 01:48:22 -0400 Subject: [PATCH] adds swagger --- docs-web/pom.xml | 110 +++++++++++++++++- docs-web/src/main/webapp/WEB-INF/openapi.yaml | 8 ++ docs-web/src/main/webapp/WEB-INF/web.xml | 2 +- 3 files changed, 117 insertions(+), 3 deletions(-) create mode 100644 docs-web/src/main/webapp/WEB-INF/openapi.yaml diff --git a/docs-web/pom.xml b/docs-web/pom.xml index 94d99952..be385242 100644 --- a/docs-web/pom.xml +++ b/docs-web/pom.xml @@ -14,6 +14,24 @@ war Docs Web + + + + 1.8 + 3.7.0 + 3.1.1 + 3.2.2 + 1.5.3 + + + 4.0.1 + 2.1 + 2.27 + 2.0.2 + 3.17.0 + + + @@ -78,7 +96,11 @@ javax.servlet-api provided - + + javax.ws.rs + javax.ws.rs-api + ${javax.ws.rs-api.version} + joda-time joda-time @@ -139,6 +161,18 @@ test + + + io.swagger.core.v3 + swagger-jaxrs2 + ${swagger.version} + + + io.swagger.core.v3 + swagger-jaxrs2-servlet-initializer + ${swagger.version} + + @@ -180,6 +214,78 @@ + + + maven-compiler-plugin + ${mvn-compiler-plugin.version} + + ${java.version} + ${java.version} + + + + + maven-dependency-plugin + ${maven-dependency-plugin.version} + + + prepare-package + + unpack + + + + + org.webjars + swagger-ui + ${swagger-ui.version} + + + ${project.build.directory}/swagger-ui + + + + + + + org.apache.maven.plugins + maven-war-plugin + ${maven-war-plugin.version} + + + + ${project.build.directory}/swagger-ui/META-INF/resources/webjars/swagger-ui/${swagger-ui.version} + + **/*.* + + swagger-ui + + + + + + + com.google.code.maven-replacer-plugin + replacer + ${replacer.version} + + + prepare-package + + replace + + + + + ${project.build.directory}/swagger-ui/META-INF/resources/webjars/swagger-ui/${swagger-ui.version}/index.html + + + http://petstore.swagger.io/v2/swagger.json + /api/openapi.json + + + + org.eclipse.jetty jetty-maven-plugin @@ -282,4 +388,4 @@ - + \ No newline at end of file diff --git a/docs-web/src/main/webapp/WEB-INF/openapi.yaml b/docs-web/src/main/webapp/WEB-INF/openapi.yaml new file mode 100644 index 00000000..571e95f2 --- /dev/null +++ b/docs-web/src/main/webapp/WEB-INF/openapi.yaml @@ -0,0 +1,8 @@ +prettyPrint: true +cacheTTL: 0 +openAPI: + info: + version: "1.0.0" + title: "Teedy" + servers: + - url: "/api" diff --git a/docs-web/src/main/webapp/WEB-INF/web.xml b/docs-web/src/main/webapp/WEB-INF/web.xml index 5c62173a..040e662e 100644 --- a/docs-web/src/main/webapp/WEB-INF/web.xml +++ b/docs-web/src/main/webapp/WEB-INF/web.xml @@ -70,7 +70,7 @@ org.glassfish.jersey.servlet.ServletContainer jersey.config.server.provider.packages - com.sismics.docs.rest.resource + io.swagger.v3.jaxrs2.integration.resources,com.sismics.docs.rest.resource jersey.config.server.provider.classnames