swagger-ui icon indicating copy to clipboard operation
swagger-ui copied to clipboard

Swagger document object order affects rendering

Open ernaniaz opened this issue 11 months ago • 1 comments

  • OS: Linux
  • Browser: Firefox
  • Version: 122.0
  • Method of installation: distribution rpm package
  • Swagger-UI version: 5.11.2
  • Swagger/OpenAPI version: OpenAPI 3.0

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:

  • "components" placed before "paths" (bug.json): Screenshot from 2024-03-11 14-18-49
  • "paths" placed before "components" (nobug.json): Screenshot from 2024-03-11 14-18-24

The only difference in the docs is the order of "components" and "paths".

ernaniaz avatar Mar 11 '24 17:03 ernaniaz

Generate interface documentation, perhaps you can try Apidog, which I think is very user-friendly and UI friendly.

satokenta940 avatar Mar 28 '24 06:03 satokenta940