sourcey / spectacle

Beautiful static documentation generator for OpenAPI/Swagger 2.0
https://sourcey.com/spectacle
Other
1.28k stars 337 forks source link

Rendering issue with schemas with circular dependancies #141

Closed andreaspsson closed 5 years ago

andreaspsson commented 6 years ago

When a schema have circular dependancies, the rendered output looks really strange, see here: screen shot 2018-04-27 at 14 03 30

Here is a small schema that illustrates the problem: https://gist.github.com/andreaspsson/3aea82c0489de63755c0145d017c80c3

I don't know that the best way t render such structure is, but now the entire document looks kind of bloated due tho these large objects. For example on https://editor.swagger.io/ it is rendered as an empty object, maybe not super, but way better, see:

screen shot 2018-04-27 at 14 01 06

tommyschnabel commented 5 years ago

+1

auscaster commented 5 years ago

Just merged a fix for this! Hope it helps and thanks for the PR