desktop icon indicating copy to clipboard operation
desktop copied to clipboard

Recursive JSON Schema breaks Viewer

Open distinctgrey opened this issue 7 years ago • 3 comments

Sometimes a model needs to reference itself, creating a recursive situation. This is completely valid JSON Schema, but seems to break the Viewer in Stoplight.

Example

screen shot 2018-11-14 at 09 54 20

screen shot 2018-11-14 at 09 54 26

screen shot 2018-11-14 at 09 54 32

distinctgrey avatar Nov 14 '18 08:11 distinctgrey

Hey @distinctgrey! What are you thinking it should look like in the UI when it is a recursive model?

tbarn avatar Nov 14 '18 22:11 tbarn

Hi @tbarn !

I'd suggest to keep it simple, either:

  • show the model name without further nesting
  • just show "recursive reference" ?

distinctgrey avatar Nov 19 '18 14:11 distinctgrey

https://speca.io/ does a good job of showing recursive endpoints as well. screen shot 2019-01-29 at 1 09 19 pm screen shot 2019-01-29 at 1 09 19 pm

tatiana-perry avatar Jan 29 '19 19:01 tatiana-perry