Open visvital opened 1 year ago
Hi @visvital, is the ordering format of OpenAPI available as a spec that can be ready by a machine (JSON Schema or similar)?
Hi @bennycode, I did a brief search, but wasn't able to find the proper spec. Here's so far the only machine-readable reference, which I liked - https://github.com/Redocly/redoc/blob/main/src/types/open-api.ts If needed, I will spend some time and build the yaml spec, according to https://spec.openapis.org/oas/v3.1.0#schema. I think I only thought of the ordering of the fixed fields sections and applying the proper recursion. Thank you!
Also, I've found this tool, which may be handy: https://github.com/proohit/openapi-snippets/tree/master
Story:
As a user, I want to sort the .yaml file according to the OpenAPI ordering of the fields so that it is easier to read and update in the future.
Acceptance criteria:
Alternative path:
Instead of introduction of the templates for sort, it might make sense to provide the option to exclude the indented elements from the sort. It should practically do the trick in most cases.
Dev Notes: