-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
Expand schemas #15
Comments
Original spec from here: jdorn/json-editor#49
Should produce the following after it's expanded:
|
Yeah, that seems like something we could do. We're in the middle of a major refactoring of Swagger Parser right now, and we're splitting all of the non-Swagger-specific logic into a seperate package called JSON Schema $Ref Parser. That's where this feature would go, since it deals solely with JSON Schema, not Swagger. |
This makes a lot of sense to me. I'll keep an eye on that project. Moved this issue there: APIDevTools/json-schema-ref-parser#1 |
Cool. Thanks for moving it over. |
Update on this issue to close the loop. It looks like support for composition has been added by the swagger-api/swagger-js library. As per their test specs
For my use case, we are using Here's an example for those also stuck trying to support composition:
|
It would be handy to provide an option to "expand" a schema to resolve things like
allOf
oroneOf
.It seems like there has already been some work put into this for the JSON-Editor project.
https://github.com/jdorn/json-editor/blob/92857220697d0e4265a1945b9a469962c340921e/src/core.js#L417
I envision this being similar to the "dereference" option.
If there is interest in this, I'd be happy to contribute a pull request, I just need some guidance on the best way to include this. I was basically going to either clone or extend the "deference" option.
The text was updated successfully, but these errors were encountered: