[
https://issues.apache.org/jira/browse/CXF-7692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16417146#comment-16417146
]
Vladimir commented on CXF-7692:
-------------------------------
In CXF 3.2.1 content type of the response is set in
[https://github.com/apache/cxf/blob/cxf-3.2.1/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java#L608]
. There, an empty _resourcePath_ param is received by _getResource()_ method.
Then _resourcePath_ value is set to "index.html", then on line 608 and below
_resourcePath_ value is analyzed and corresponding content type is set.
In CXF 3.2.2 content type is supposed to be set in a similar way in
[https://github.com/apache/cxf/blob/cxf-3.2.2/rt/rs/description-swagger-ui/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerUiService.java#L75]
. However, in 3.2.2 emtpy _resourcePath_ parameter value is not modified,
therefore content type is not being defined there, and later it is set to
default value *application/octet-stream*
> Swagger UI is not shown in OSGi deployment
> ------------------------------------------
>
> Key: CXF-7692
> URL: https://issues.apache.org/jira/browse/CXF-7692
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 3.2.2, 3.2.4
> Reporter: Vladimir
> Priority: Major
>
> When using CXF Swagger feature, Swagger UI is not displayed in Firefox and
> Chrome, instead the html page is automatically downloaded.
> The reason for this is that Content-Type header sent with Swagger UI page is
> _application/octet-stream ._
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)