phoenix-json-api
Installation
SKILL.md
Phoenix JSON API
RULES — Follow these with no exceptions
- Use the
:apipipeline — don't mix HTML and JSON pipelines; API routes skip CSRF and sessions - Render errors as structured JSON —
{:error, changeset}must become{"errors": {...}} - Version APIs via URL prefix (
/api/v1/) — not headers; URL versioning is visible and cacheable - Use
FallbackControllerfor consistent error handling — every action returns{:ok, result}or{:error, reason}
Build Workflow
Follow these steps in order when constructing a new API endpoint: