-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make handling circular references configurable #74
Comments
Would it be equally difficult to support resolving into genuinely cyclic (non-JSON) objects as with your prior support of depth? (It appears my validator (Ajv) can support circular schemas, so building cyclic objects might work out nicely in the absence of depth (or even preferable to it in some cases, by its avoiding memory problems and uncertainty as far as the depth one would require).) |
Well, if your validator can resolve relative references it should also be able to resolve the circular reference for validation. ;) In all seriousness, I could end up with bringing back depth support but I do remember it being a pain...although with the new API it could be trivial. |
Any ETA on this? It breaks a major tool (swagger-ui) and has been open for over a year. |
How is |
This issue was referenced in swagger-api/swagger-editor#1005 perhaps incorrectly. |
Ah, |
What if |
The reason circulars were originally removed/replaced was due to tooling I was building around not supporting circular documents. This wasn't fair. I do think I could make it configurable but my worry is that no one will ever be completely satisfied. |
|
`options.allowCircular` was added to the resolution API options. This will allow callers to allow circular references to be resolved instead of leaving them unresolved. Fixes #74
`options.resolveCirculars` was added to the resolution API options. This will allow callers to allow circular references to be resolved instead of leaving them unresolved. Fixes #74
We need to make it where a configuration option can dictate whether circular references are replaced with its original definition or
{}
.The text was updated successfully, but these errors were encountered: