Does openapi-format
support sorting the path alphabetically?
#90
-
Hi, thank you for creating such an amazing tool. I have a question regarding the sorting feature. Does this tool support sorting the paths alphabetically? For example, if I have the following yaml: paths:
/api/posts/{id}:
/api/posts:
/api/posts/{id}/comments: Does this tool allow me to sort the paths and make it like so? paths:
/api/posts:
/api/posts/{id}:
/api/posts/{id}/comments: Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
hi @tuananhlai At this moment, it does not sort the paths, since we consider this part of the developer experience (DX), where the API designer might put them in a specific order of important or common-sense. We are extending the sorting of inline query params & headers, to facilitate "diffing" of generated specs. Could you share a bit why you would want to sort the "paths"? |
Beta Was this translation helpful? Give feedback.
hi @tuananhlai
We just release 1.22.0 of openapi-format, which includes the option to sort paths alphabetically or by tag.