home / skills / makfly / superpowers-symfony / api-platform-tests
This skill helps you design and validate API Platform contracts in Symfony, enforcing explicit operations, mapping, and security for robust tests.
npx playbooks add skill makfly/superpowers-symfony --skill api-platform-testsReview the files below or copy the command above to add this skill to your agents.
---
name: symfony:api-platform-tests
allowed-tools:
- Read
- Write
- Edit
- Bash
- Glob
- Grep
description: Deliver robust API Platform contracts in Symfony with explicit operations, mapping, and policy-safe behavior. Use for api platform tests tasks.
---
# Api Platform Tests (Symfony)
## Use when
- Designing or evolving API Platform contracts and operations.
- Aligning serialization, validation, and security behavior.
## Default workflow
1. Define operation-level contract and payload boundaries.
2. Implement resource/DTO/provider/processor changes with explicit mapping.
2. Apply operation-specific validation and security constraints.
2. Validate functional behavior across happy and negative paths.
## Guardrails
- Keep API contract explicit and version-aware.
- Avoid exposing internal entity fields implicitly.
- Prevent drift between docs and actual serialization.
## Progressive disclosure
- Use this file for execution posture and risk controls.
- Open references when deep implementation details are needed.
## Output contract
- API artifacts changed (resource/DTO/provider/processor).
- Contract/security decisions and rationale.
- Functional verification results.
## References
- `reference.md`
- `docs/complexity-tiers.md`
This skill helps deliver robust API Platform contracts in Symfony by making operations, payload mapping, and policy behavior explicit. It focuses on test-driven verification of serialization, validation, and security across happy and negative paths. The goal is predictable, version-aware API behavior with clear artifacts and rationale.
You define operation-level contracts and explicit payload boundaries, then implement resources, DTOs, providers, and processors with deliberate mapping. Operation-specific validation and security constraints are applied and exercised by functional tests that verify both expected success and failure scenarios. The skill outputs changed API artifacts, documented contract and security decisions, and verification results for each operation.
What outputs should I include after tests?
Include changed API artifacts (resources, DTOs, providers, processors), the contract and security decisions with rationale, and functional verification results for each operation.
How do I prevent mismatch between docs and behavior?
Make payloads and serialization explicit, version operation contracts, and keep tests that assert documented responses and error shapes.