Skip to content
Development
Skill

/api-platform-resources

Configure API Platform resources (v5, 4.4, 4.3) with explicit operations, pagination, and typed OpenAPI for clean, versioned REST/GraphQL APIs

From plugin
superpowers-symfony
22744 skills14 agents13 commands1 hook

Claude Code

$ npx -y skills add dev-toolings/superpowers-symfony --skill api-platform-resources --agent claude-code

SKILL.md

api-platform-resources.SKILL.md
name: api-platform-resources
description: Configure API Platform resources (v5, 4.4, 4.3) with explicit operations, pagination, and typed OpenAPI for clean, versioned REST/GraphQL APIs
capabilities: [read, search, edit, shell]
tags: [api-platform]
# projected by `bun run build` — do not edit by hand
allowed-tools:
  - Read
  - Glob
  - Grep
  - Write
  - Edit
  - Bash

Api Platform Resources (Symfony)

Use when

  • Exposing a new entity or class as an `#[ApiResource]`.
  • Choosing exactly which of `Get`, `GetCollection`, `Post`, `Put`, `Patch`, and `Delete` the API offers.
  • Tuning collection pagination (items per page, partial pagination, client control).
  • Documenting operations with typed OpenAPI objects instead of `openapiContext` arrays.

Default workflow

1. Install only the components you need: `api-platform/symfony`, `api-platform/doctrine-orm`, and optionally `api-platform/graphql`; on Symfony 6.4 LTS, pin them to `~4.3.0`. 2. List every operation in `operations:`, since declaring any one stops the automatic CRUD, and `Put` is never automatic. 3. Set `uriTemplate`, `requirements`, `status`, or `routePrefix` only where the defaults do not fit. 4. Configure pagination through resource attributes or `api_platform.defaults` in `config/packages/api_platform.yaml`. 5. Describe operations with `openapi:` model objects, set `validationContext` groups, then check the routes and the OpenAPI export.

Guardrails

  • Declaring one operation removes the default CRUD: an `operations: [new Get()]` resource has no collection, `Post`, or `Delete`.
  • `openapiContext` arrays are deprecated in v4: use the typed `openapi:` option.
  • `collectionOperations` and `itemOperations` no longer exist.
  • `paginationClientEnabled` lets clients disable pagination: keep `paginationMaximumItemsPerPage` set.

Progressive disclosure

  • Use this file for execution posture and risk controls.
  • Open references when deep implementation details are needed.

Output contract

  • The resource class with its explicit operation list and the routes it produces.
  • Pagination and OpenAPI settings, with the reason for each override.
  • Route listing and test results for each declared operation.

References

  • `reference.md`
Read more
@dev-toolings
Ships withsuperpowers-symfony

Superpowers Symfony gives coding agents deep, version-accurate Symfony expertise: from Doctrine schema design and API Platform REST/GraphQL APIs to test-driven development, async Messenger workflows, caching, rate limiting, and clean architecture.

22744 skills14 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
227
Star history of dev-toolings/superpowers-symfony on GitHub, a chart by star-history.com

Other skills on superpowers-symfony.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about api-platform-resources.

Which coding agents can use api-platform-resources?
api-platform-resources installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.