Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7734

Swagger2Feature - application/octet-stream media type is returned for index.html

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1.15
    • 3.1.16
    • JAX-RS
    • None
    • Unknown

    Description

      Reproduced after CXF-7581.

      org.apache.cxf.jaxrs.swagger.Swagger2Feature.SwaggerUIService#getResource does not set media type for the root resource ("" or "/" paths)

      So, application/octet-stream type is set by default instead of text/html

      Steps to reproduce (See Swagger2Feature - Automatic UI Activation):

      • Setup Swagger2Feature
      • Open swagger-ui in a browser $base_rest_url/api-docs?url=swagger.json

      Actual: The file is downloading
      Expected: The index.html page is displayed

      Pull request: https://github.com/apache/cxf/pull/416

      Attachments

        Issue Links

          Activity

            People

              deki Dennis Kieselhorst
              yurkom Yury Molchan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: