Skip to content
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

Swagger-UI not display paramters by the correct order as define in controller method #3033

Closed
NirReigo opened this issue Jul 4, 2019 · 1 comment

Comments

@NirReigo
Copy link

NirReigo commented Jul 4, 2019

using spring boot + swagger , maven project
springfox artifacts

io.springfox
springfox-swagger2
2.9.2

        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <version>2.9.2</version>
        </dependency>

spring boot version - (v2.1.6.RELEASE)
it seems that swagger by default ignore paramters order define on controller method , and by defualt sort paramers order by paramter name (alphabetically)

I think that that the correct approch is first display paramters order as they define on controller method , as fallback to that you can add postion argument to swagger annotation / or enable some configuration to disable this default alphabetically sorting .

method on spring boot controller

image

result on swagger-ui.html

image

as you can see swagger ui html not display the paramter order as they define on controller method

@NirReigo
Copy link
Author

NirReigo commented Jul 4, 2019

Duplicate of #2705

@NirReigo NirReigo closed this as completed Jul 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant