Does openapi-format support sorting the path alphabetically?
#90
Answered
by
thim81
tuananhlai
asked this question in
Q&A
|
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. |
Answered by
thim81
Aug 4, 2024
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"? |
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi @tuananhlai
We just release 1.22.0 of openapi-format, which includes the option to sort paths alphabetically or by tag.