-
Notifications
You must be signed in to change notification settings - Fork 15
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
Keep $ref dereference when writing the update files #71
Comments
yes this would be great. in addition we make heavily use of |
You could try to do them one by one, although it is not ideal and I m not sure it it would work fully. Another approach could be to use a good diff tool and diff the final, formatted result with the various files. Also not ideal. Ideally, would be to have openapi-format support referenced files. I need to find time to play with the json-ref library. If you or anybody else are interested, I always welcome PRs. |
Cool thanks a lot. I‘ll explore myself options too.. |
hi @rngtng With the release 1.24.0 of OpenAPI, we introduced the option to split OpenAPI files in a file/folder structure. The graph TD
A[Start] --> B[Load OpenAPI Split File]
B --> C[Apply Bundling]
C --> D[Apply Filtering]
D --> E[Apply Sorting]
E --> F{Split OpenAPI?}
F -- Yes --> G[Split into Multiple Files]
F -- No --> H[Save as Single File]
G --> I[Save Modular Structure]
H --> I[Save Final Output]
I --> J[End]
You can give it a try
Let me know what you think of it. |
Currently, openapi-format dereferences the OpenAPI documents to do its formatting, sorting, ... and write a dereferenced result.
Investigate the option to leverage: https://www.npmjs.com/package/json-refs to format the OpenAPI documents and update the $ref values in different files.
The text was updated successfully, but these errors were encountered: