ruby-grape / ruby-grape/grape-swagger
Wrong route ordering
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 1.1k
- Forks
- 479
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 6
Description
There is wrong ordering of routes.
For example - there is ordering in the resource I've set:
GET users/GET users/:idPOST users/POST users/:id/restorePUT users/:idDELETE users/:id
But grape-swagger is generating it like this:
GET users/POST users/DELETE users/:idGET users/:idPUT users/:idPOST users/:id/restore
The fix from https://github.com/ruby-grape/grape-swagger/pull/859 doesn't fix it completely. The order is still not the same as it was "declared"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the route-ordering behavior and the incomplete fix in pull request #859. Reproduce the issue with the route sequence in this report, then trace how grape-swagger collects and emits routes; done means the generated order matches the declaration order, including parameterized and restore routes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, ruby
- Domain
- api, documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100