-
Notifications
You must be signed in to change notification settings - Fork 37
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
Support for bundling without dereferencing #20
Comments
I've spent some time looking at this in the last 24 hours and think I have the beginning of a solution. Would essentially pass in an option that allows you to keep the references of first level objects. It would then do error checks in combinedSchema to detect duplicates for items such as:
Any other first level objects that we need to do error checking against? There would also be the ability to add an options to sort these first level objects alphabetically:
I added this second item in after combining several swagger defs together and ending up with a combined definition that was over 100,000 lines. Needed a quick and easy way to visually spot check. |
Especially useful for recursive schemas, they completely fail with a "Maximum call stack size exceeded" error |
Was this ever implemented? I see some vague references to the resolve config, but I can't see how to use these to prevent de-refefencing. |
Dereferencing also seems to fail for multi-level references as well. For example, you have a data type (in components/schemas) referenced in your response type (in components/responses), that's in turn referenced in your path/method definition (in paths). The data type definition is not exported, yet all of its Having an option to bundle some definitions without dereferencing would help to deal with these cases, as well as with circular referencing (which I have come across quite often). It'd also help to decrease the schema's size, for big and/or highly reusable base types. |
JSON Schema $Ref Parser supports bundling schemas as opposed to dereferencing them: https://github.com/BigstickCarpet/json-schema-ref-parser/blob/master/docs/ref-parser.md#bundleschema-options-callback
It would be useful if swagger-combine supported this mode of operation as well.
The text was updated successfully, but these errors were encountered: