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

fix: honor x-order while sorting query parameters #806

Conversation

lantw44
Copy link
Contributor

@lantw44 lantw44 commented Oct 13, 2020

Describe the PR
Instead of always sorting parameters with name, which can surprise users
because x-order is ignored, sort them with the slice type declared in
github.com/go-openapi/spec to reuse its comparison method.

Relation issue
#681

Additional context
It can be simplified if go-openapi/spec#117 is merged.

Instead of always sorting parameters with name, which can surprise users
because x-order is ignored, sort them with the slice type declared in
github.com/go-openapi/spec to reuse its comparison method.
@codecov
Copy link

codecov bot commented Oct 13, 2020

Codecov Report

Merging #806 into master will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #806      +/-   ##
==========================================
+ Coverage   82.33%   82.38%   +0.04%     
==========================================
  Files           8        8              
  Lines        1608     1612       +4     
==========================================
+ Hits         1324     1328       +4     
  Misses        168      168              
  Partials      116      116              
Impacted Files Coverage Δ
operation.go 87.20% <100.00%> (+0.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 01fb318...c0c8af3. Read the comment docs.

Copy link
Member

@sdghchj sdghchj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sdghchj sdghchj merged commit 6937d1c into swaggo:master Oct 15, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants