reta commented on a change in pull request #507: CXF-7957: Swagger2Feature Doesn't Work With Swagger Versions Above 1.… URL: https://github.com/apache/cxf/pull/507#discussion_r252446880
########## File path: rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/openapi/SwaggerToOpenApiConversionFilter.java ########## @@ -55,7 +57,8 @@ public void filter(ContainerRequestContext reqCtx) throws IOException { @Override public void filter(ContainerRequestContext reqCtx, ContainerResponseContext respCtx) throws IOException { if (Boolean.TRUE == reqCtx.getProperty(OPEN_API_PROPERTY)) { - String swaggerJson = (String)respCtx.getEntity(); + String swaggerJson = respCtx.getEntity() instanceof String ? (String)respCtx.getEntity() Review comment: It is exactly the same: the mapper does nothing for `String` (returns the same string back) but convert to JSON any object (same is done with `?:`) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services