ruby-grape / ruby-grape/grape-swagger
Entity and corresponding status code should always added to the response messages http_codes array.
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 1.1k
- Forks
- 479
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 6
Description
In my opinion the success flow an item that should be listed in swaggers responseMessages array. Mainly because its not always trivial the success flow will return an 200 status code. On post methods the API will/can return a 201 status code.
Therefor the success message and entity should be merged to the responseMessages array (on top).
The status code can be extracted out of the method called.
But there is an issue with that. You may set custom status codes in the body block. If grape #1238 gets approved we can extract the status code from the description.
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 tracing how the Swagger responseMessages array is generated for successful POST methods and how status codes are obtained from the called method or body block. Review the dependency on grape issue #1238 before deciding the extraction approach. Done means the success status, entity, and message are consistently included in responseMessages, including non-200 responses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- api, documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100