Swagger that passes validation and also works in the 2.2.8 version of the UI causes the following error:
Resolver error
Maximum call stack size exceeded
Here is a sample swagger repro case:
Try it out here:
http://petstore.swagger.io/?url=https://gist.githubusercontent.com/JohnRudolfLewis/10c2202d251bee2c820f3167b64edd6d/raw/331ac5cc351c362b54453a818c2665114fba22fa/Swagger.yaml
The problem is related to the definition that represents a tree structure, it has an array property of itself.
Have the same issue with http://petstore.swagger.io/?url=https://raw.githubusercontent.com/oasis-tcs/odata-openapi/master/examples/example.openapi.json.
This file worked fine with Swagger UI version 3.0.4 and is now broken with version 3.0.6.
i have the same issue, i downgraded the swagger ui to 3.0.4 and now it works fine
Have the same issue. Guys, can we force up it to p0? We have a broken documentation right now and it's very painful for us.
@seifer I suggest you downgrade for now then.
@webron Yeah, done it :) When will this issue fix?
When we get around to it. We have limited resources. PRs are welcome.
The root cause is a model that has a $ref to itself. The example in the OP was direct, it may happen with an indirect cycle as well. Also note that swagger-editor has the same problem - would this imply this is in shared code (perhaps swagger-js)?
The source is in swagger-js indeed. We're actively investigating the issue.
Hi everyone - we just merged the PR that fixes this in swagger-js, and you can expect the fix to be in our Friday release tomorrow evening 馃槃
Note: Circular references still aren't rendered correctly, but UI no longer crashes, which is good.
We will open a successor ticket for correct rendering functionality.
I don't care whether the rendering is ok or not for now., but UI still crashes. It seems that PR solves only self-reference thing.
https://gist.githubusercontent.com/JohnRudolfLewis/10c2202d251bee2c820f3167b64edd6d/raw/331ac5cc351c362b54453a818c2665114fba22fa/Swagger.yaml
But if the definitions have indirect cycles, the UI crashes.
https://raw.githubusercontent.com/oasis-tcs/odata-openapi/master/examples/example.openapi.json
@sgyang, can you open a new ticket for this issue? The original issue in this thread is fixed, so I'd like to avoid needlessly CCing everyone above.
Also, it'd be great if you can provide a simplified test case, like the one in the first link you provided. Full specs are hard to work with on our end, since it can be difficult to isolate the problem - I wasn't able to create an indirect reference spec that reproduced the issue, though the full spec you provided does throw an error.
Thanks!
谐邪褍薪芯 薪械泄泻邪械
Locking due to inactivity.
This is done to avoid resurrecting old issues and bumping long threads with new, possibly unrelated content.
If you think you're experiencing something similar to what you've found here: please open a new issue, follow the template, and reference this issue in your report.
Thanks!
Most helpful comment
Have the same issue with http://petstore.swagger.io/?url=https://raw.githubusercontent.com/oasis-tcs/odata-openapi/master/examples/example.openapi.json.
This file worked fine with Swagger UI version 3.0.4 and is now broken with version 3.0.6.