This is an automated email from the ASF dual-hosted git repository.
sergeyb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/master by this push:
new d79f7b8 [CXF-7637] Making openapi json path configurable
d79f7b8 is described below
commit d79f7b8ce4157cca24d45a2cbb5ca8db9cfa0e7c
Author: Sergey Beryozkin <[email protected]>
AuthorDate: Wed Feb 7 12:37:53 2018 +0000
[CXF-7637] Making openapi json path configurable
---
.../jaxrs/swagger/openapi/SwaggerToOpenApiConversionFilter.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git
a/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/openapi/SwaggerToOpenApiConversionFilter.java
b/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/openapi/SwaggerToOpenApiConversionFilter.java
index 9e40ee8..4faa803 100644
---
a/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/openapi/SwaggerToOpenApiConversionFilter.java
+++
b/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/openapi/SwaggerToOpenApiConversionFilter.java
@@ -40,10 +40,12 @@ public final class SwaggerToOpenApiConversionFilter
implements ContainerRequestF
private static final String OPEN_API_PROPERTY = "openapi";
private OpenApiConfiguration openApiConfig;
+ private String openApiJsonPath = OPEN_API_PATH;
+
@Override
public void filter(ContainerRequestContext reqCtx) throws IOException {
String path = reqCtx.getUriInfo().getPath();
- if (path.endsWith(OPEN_API_PATH)) {
+ if (path.endsWith(openApiJsonPath)) {
reqCtx.setRequestUri(URI.create(SWAGGER_PATH));
reqCtx.setProperty(OPEN_API_PROPERTY, Boolean.TRUE);
}
@@ -68,4 +70,8 @@ public final class SwaggerToOpenApiConversionFilter
implements ContainerRequestF
public void setOpenApiConfig(OpenApiConfiguration openApiConfig) {
this.openApiConfig = openApiConfig;
}
+
+ public void setOpenApiJsonPath(String openApiJsonPath) {
+ this.openApiJsonPath = openApiJsonPath;
+ }
}
--
To stop receiving notification emails like this one, please contact
[email protected].