api-platform-resources

Installation
SKILL.md

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.
Installs
65
GitHub Stars
224
First Seen
Sep 18, 2026