-
Notifications
You must be signed in to change notification settings - Fork 130
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
Paths ordering #34
Comments
@carlsonngo thanks for reporting, I am curious how important this order is to you? |
Feeding the data to swagger-ui will display the paths in the wrong order. This might be confusing for people if they want to preserve the order in the generated api docs. |
@carlsonngo thanks for the context. |
+1 For me it's not even reverse order, but a completely random one. Using 0.2.0. |
+1 for me, it is displayed as random order. Using play 2.5.4, play-swagger 0.5.0 |
So how do we order, using play 2.5.x, play-swagger 0.5.3? Looks random to me. |
@tculshaw we haven't implement the feature the preserve the ordering in the routes file. Any PR will be more than welcome :) |
If any one is interested I have a partial solution, hence this isn't a formal pull request. Replacing the path function in SwaggerSpecGenerator, I order the main unique paths as per the ROUTE file, but NOT the order where multiple methods (GET,PUT,POST,DELETE) apply to the same path. It's a lot better than it used to be, and will suffice for my needs, but still not quite 100%!
I banged my head against the wall to get this going, so hope this is helpful to somebody! |
Thanks very much @tculshaw, it's not quite 100% but it's still a step forward. I will appreciate it if you want to submit a PR (just need a simple test for the ordering). |
This can now be closed? Thanks for accepting my change #152 |
@tculshaw it's still a partial solution right? ("NOT the order where multiple methods (GET,PUT,POST,DELETE) apply to the same path") |
Yeah sorry!
I wasn't going to get totally caught up in the method orders where the path
is shared. It did my head in just doing this one;)
Probably(?) most users who want the ordering will be happy to have the
solution provided as is.
I will look at if I get chance - if you think it's worth doing?
Tony Culshaw MA Cantab
Director
Mentation Limited - Custom Software Development
…On 7 April 2017 at 11:40, Kai(luo) Wang ***@***.***> wrote:
@tculshaw <https://github.com/tculshaw> it's still a partial solution
right? ("NOT the order where multiple methods (GET,PUT,POST,DELETE) apply
to the same path")
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#34 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAianUJP454DiNMUeXkdxSJMZED_fvnoks5rtXfcgaJpZM4GxjIG>
.
|
I imagine it would be nice for some users, but I don't particularly have that need in my projects. Thanks for offering! And thanks again for your contribution! |
No worries:)
Tony Culshaw MA Cantab
Director
Mentation Limited - Custom Software Development
…On 7 April 2017 at 14:26, Kai(luo) Wang ***@***.***> wrote:
I imagine it would be nice for some users, but I don't particularly have
that need in my projects. Thanks for offering! And thanks again for your
contribution!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#34 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAianVIj1ZQGroZgMcdCD9Cz2McpjZzQks5rtZ6-gaJpZM4GxjIG>
.
|
…-4.8.11 Update scalameta to 4.8.11
Generated JSON paths is in reverse order compared to ones defined in routes file
The text was updated successfully, but these errors were encountered: