

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
123456always print # Swagger and API Documentation78## Automatic Documentation Generation9- Every time a new controller is created, its documentation should be generated in Swagger.10- Use [rswag](mdc:https:/github.com/rswag/rswag) to generate and maintain API documentation in Rails.1112## Swagger Conventions13- Define clear `summary` and `description` for each endpoint.14- Use `@params` and `@response` correctly.15- Add JSON response examples.16- Document HTTP status codes (200, 400, 404, 500, etc.).17- Use `Bearer Token` in Swagger authentication.1819## Example of Documentation in a Controller20```ruby21swagger_path '/users' do22 operation :get do23 key :summary, 'Get all users'24 key :description, 'Returns the list of registered users'25 response 200 do26 key :description, 'Users successfully retrieved'27 schema type: :array, items: { '$ref' => '#/definitions/User' }28 end29 end30end31```32```3334```
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| nduartex/cursor-rules-ruby-api.cursor/rules/api.mdc · 0 | Cursor rules | api | 19/100 | 14 days ago | |
| nduartex/cursor-rules-ruby-api.cursor/rules/clean_code.mdc · 0 | Cursor rules | do-not | 38/100 | 14 days ago | |
| nduartex/cursor-rules-ruby-api.cursor/rules/database.mdc · 0 | Cursor rules | no sections | 4/100 | 14 days ago | |
| nduartex/cursor-rules-ruby-api.cursor/rules/design_patterns.mdc · 0 | Cursor rules | style | 49/100 | 14 days ago | |
| nduartex/cursor-rules-ruby-api.cursor/rules/general.mdc · 0 | Cursor rules | do-not | 11/100 | 14 days ago | |
| nduartex/cursor-rules-ruby-api.cursor/rules/git.mdc · 0 | Cursor rules | stylearchtypesgit+2 | 65/100 | 14 days ago | |
| nduartex/cursor-rules-ruby-api.cursor/rules/ruby.mdc · 0 | Cursor rules | styledo-not | 15/100 | 14 days ago | |
| nduartex/cursor-rules-ruby-api.cursor/rules/security.mdc · 0 | Cursor rules | securityapido-not | 32/100 | 14 days ago | |
| nduartex/cursor-rules-ruby-api.cursor/rules/serializers.mdc · 0 | Cursor rules | do-not | 52/100 | 14 days ago | |
| nduartex/cursor-rules-ruby-api.cursor/rules/testing.mdc · 0 | Cursor rules | testdo-not | 15/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/nduartex-cursor-rules-ruby-api-cursor-rules-swagger)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.
Directory