Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-10883

Swagger document object order affects rendering

XMLWordPrintable

    • False
    • None
    • False
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started

      When the "components" section of a Swagger document is placed before the "paths", the rendering of schemas with $ref fails to display as shown below:

      1. "components" placed before "paths":

        bug.json-buggy
      2. "paths" placed before "components":

        bug.json-correct-order

      This was tested with SwaggerUI version 5.11.2.

      In the 3scale product, we can just ensure that the order of the elements is correct when processing the document.

      I'm also posting this bug report to the SwaggerUI team to fix in their product. https://github.com/swagger-api/swagger-ui/issues/9681

      Dev Notes: We use SwaggerUI 3.52.

        1. Screenshot from 2024-03-11 14-18-49.png
          33 kB
          Ernani Azevedo
        2. bug.json-buggy
          4 kB
          Ernani Azevedo
        3. Screenshot from 2024-03-11 14-18-24.png
          41 kB
          Ernani Azevedo
        4. bug.json-correct-order
          4 kB
          Ernani Azevedo

            Unassigned Unassigned
            rhn-support-eazevedo Ernani Azevedo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: