This is an automated email from the ASF dual-hosted git repository. reta pushed a commit to branch CXF-7601_microProfileOpenApi in repository https://gitbox.apache.org/repos/asf/cxf.git
commit e1b81269089d6e7cb53e949a9fde629d37bce421 Author: reta <[email protected]> AuthorDate: Mon Jul 15 23:01:00 2019 -0400 Accomodate recent microprofile OpenApi changes --- .../jax_rs/description_openapi_microprofile_spring/README.txt | 6 +++--- .../samples/jax_rs/description_openapi_microprofile_spring/pom.xml | 3 +-- .../src/main/java/demo/jaxrs/openapi/server/AppConfig.java | 2 +- parent/pom.xml | 5 +++++ .../org/apache/cxf/jaxrs/microprofile/openapi/OpenApiFeature.java | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/README.txt b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/README.txt index ac8ab9b..d1f673e 100644 --- a/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/README.txt +++ b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/README.txt @@ -20,13 +20,13 @@ Using either UNIX or Windows: After the service is started, the Swagger API documents in JSON and YAML are available at - http://localhost:9000/sample/openapi.json - http://localhost:9000/sample/openapi.yaml + http://localhost:9000/openapi.json + http://localhost:9000/openapi.yaml To remove the target dir, run mvn clean". To navigate to the hosted Swagger UI, please type in the browser: - http://localhost:9000/sample/api-docs/?url=/sample/openapi.json + http://localhost:9000/api-docs/?url=/openapi.json diff --git a/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/pom.xml b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/pom.xml index f4734b2..dea2f13 100644 --- a/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/pom.xml +++ b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/pom.xml @@ -25,7 +25,7 @@ <parent> <groupId>org.apache.cxf.samples</groupId> <artifactId>cxf-samples</artifactId> - <version>3.3.2-SNAPSHOT</version> + <version>3.3.3-SNAPSHOT</version> <relativePath>../..</relativePath> </parent> @@ -76,7 +76,6 @@ <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-rs-service-description-microprofile-openapi</artifactId> - <version>3.3.2-SNAPSHOT</version> </dependency> <dependency> <groupId>org.apache.johnzon</groupId> diff --git a/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/java/demo/jaxrs/openapi/server/AppConfig.java b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/java/demo/jaxrs/openapi/server/AppConfig.java index a5c039a..0d6c33a 100644 --- a/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/java/demo/jaxrs/openapi/server/AppConfig.java +++ b/distribution/src/main/release/samples/jax_rs/description_openapi_microprofile_spring/src/main/java/demo/jaxrs/openapi/server/AppConfig.java @@ -28,7 +28,7 @@ public class AppConfig { final JAXRSServerFactoryBean factory = new JAXRSServerFactoryBean (); factory.setFeatures(Arrays.asList(openApiFeature())); factory.setServiceBean(sampleResource()); - factory.setAddress("http://localhost:9000/sample"); + factory.setAddress("http://localhost:9000/"); factory.setProvider(new JsonbJaxrsProvider<>()); return factory.create(); } diff --git a/parent/pom.xml b/parent/pom.xml index fb37cb5..3708a46 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -912,6 +912,11 @@ </dependency> <dependency> <groupId>org.apache.cxf</groupId> + <artifactId>cxf-rt-rs-service-description-microprofile-openapi</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http</artifactId> <version>${project.version}</version> </dependency> diff --git a/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/microprofile/openapi/OpenApiFeature.java b/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/microprofile/openapi/OpenApiFeature.java index d07ec63..2ad6bdc 100644 --- a/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/microprofile/openapi/OpenApiFeature.java +++ b/rt/rs/description-microprofile-openapi/src/main/java/org/apache/cxf/jaxrs/microprofile/openapi/OpenApiFeature.java @@ -114,7 +114,7 @@ public class OpenApiFeature extends AbstractFeature implements SwaggerUiSupport, sfb, bus, resourcePackages, isScan()); final AnnotationProcessor processor = new AnnotationProcessor(GeronimoOpenAPIConfig.create(), - new NamingStrategy.Http()); + new NamingStrategy.Http(), null /* default JsonReaderFactory */); final OpenAPIImpl api = new OpenAPIImpl();
