api-rest-collection
Use when creating or modifying REST API endpoints (Rails controllers, engine routes, API actions). Requires generating or updating an API Collection file (e.g., Postman Collection v2.1) so the new or changed endpoints can be tested. Trigger words: endpoint, API route, controller action, API collection, request collection. --- # REST API Collection Use this skill when you add or change a REST API endpoint so that a compatible collection file is generated or updated for testing in a modern API client. **Core principle:** Every API surface (Rails app or engine) has a single API collection file that stays in sync with its endpoints. All names, descriptions, and variable labels in the collection must be in **English**. ## Quick Reference | Aspect | Rule | |--------|------| | When | Create or update collection when creating or modifying any REST API endpoint (route + controller action) | | Format | Postman Collection JSON v2.1 (`schema` or `info.schema` references v2.1) is a good default standard. | | Location | One file per app or engine, e.g. `docs/api-collections/<app-or-engine-name>.json` or `spec/fixtures/api-collections/` | | Language | All request names, descriptions, and variable names in the collection in **English** | | Per request | method, URL (with variables for base URL), headers (Content-Type, Authorization if needed), body example when applicable | ## HARD-GATE: Generate on Endpoint Change ``` When you create or modify a REST API endpoint (new or changed route and controller action), you MUST also create or update the corresponding API collection file so the flow can be tested. Do not leave the collection missing or outdated.
Changelog: Source: GitHub https://github.com/igmarin/rails-agent-skills
Loading comments...