jwcarman 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_r252426189
##########
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:
I was trying to maintain the exact functionality in a 1.5.17 world if I
could.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services