This is an automated email from the ASF dual-hosted git repository.
sergeyb pushed a commit to branch 3.1.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/3.1.x-fixes by this push:
new da9e94e Minor update to 3.1.x SwaggerToOpenApi filter to support
Swagger 1.5.17 and newer
da9e94e is described below
commit da9e94e3197aecb03aff030eaf0b481c17d9ed7d
Author: Sergey Beryozkin <[email protected]>
AuthorDate: Wed Dec 27 13:32:46 2017 +0000
Minor update to 3.1.x SwaggerToOpenApi filter to support Swagger 1.5.17 and
newer
---
.../cxf/jaxrs/swagger/openapi/SwaggerToOpenApiConversionFilter.java | 3 ++-
1 file changed, 2 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 f2b1446..89a8474 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
@@ -67,7 +67,7 @@ public final class SwaggerToOpenApiConversionFilter
implements ContainerRequestF
@Override
public void aroundWriteTo(WriterInterceptorContext context) throws
IOException, WebApplicationException {
- if (isOpenApiRequested() && !(context.getEntity() instanceof String)) {
+ if (isOpenApiRequested()) {
OutputStream os = context.getOutputStream();
CachedOutputStream cos = new CachedOutputStream();
context.setOutputStream(cos);
@@ -91,6 +91,7 @@ public final class SwaggerToOpenApiConversionFilter
implements ContainerRequestF
String swaggerJson = (String)responseContext.getEntity();
String openApiJson =
SwaggerToOpenApiConversionUtils.getOpenApiFromSwaggerJson(swaggerJson,
openApiConfig);
responseContext.setEntity(openApiJson);
+
JAXRSUtils.getCurrentMessage().getExchange().remove(OPEN_API_PROPERTY);
}
}
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].