Closed thim81 closed 6 months ago
hi @edrandall
For the "diff" use-case, it makes sense to have them sorted. For Request parameters and headers, the DX (developer experience) might be more important.
To support both cases, I'll consider introducing a option to allow the sorting to be turned on/off. Default it will be "off" to respect the manual order set by the OpenAPI designer.
hi @edrandall,
I had already foreseen a mechanism to sort by using the --sortComponentsFile
option.
Have a look at the test that shows how you can use this: https://github.com/thim81/openapi-format/tree/main/test/json-sort-request-params
Linked to #82