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

Overrides sort order #1763

Closed
nastassiar opened this issue Nov 18, 2015 · 3 comments
Closed

Overrides sort order #1763

nastassiar opened this issue Nov 18, 2015 · 3 comments

Comments

@nastassiar
Copy link

I am trying to use OrderActionGroupsBy in Swashbuckle to sort my api, but because swagger ui defaults to alphabetic ordering it is overwriting my sorting.

domaindrivendev/Swashbuckle.WebApi#567

Based off of the documentation it seems like it should default to server order:

Apply a sort to the API/tags list. It can be 'alpha' (sort by name) or a function (see
Array.prototype.sort() to know how sort function works). Default is the order returned by the server
unchanged.

Is it intentional that the default apisSorter is alpha?

@webron
Copy link
Contributor

webron commented Dec 1, 2015

Yes, it is. Many language integrations don't offer a way to fine control the order and then it becomes a mess. An alphabetical order makes it at least easier to follow.

@webron webron closed this as completed Dec 1, 2015
@urbanthings
Copy link

This doesn't seem right - the ReadMe for swagger-ui says, for parameter apisSorter:

"Default is the order returned by the server unchanged."

...yet, as mentioned above, if you omit the apisSorter parameter, the default seems to be alpha-sort.

Is this an error in the ReadMe or an error in swagger-ui?

@webron
Copy link
Contributor

webron commented Dec 15, 2015

@urbanthings - I believe that's part of the documentation that wasn't updated with the move to 2.0.

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

3 participants