symfony-sk:api-dto

Create Symfony API DTOs with validation attributes for structured input.

Updated Jan 15, 2026
One-click install
npx skills add https://github.com/Swoking/symfony-sk-plugin --skill symfony-sk-api-dto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: symfony-sk:api-dto
Source: https://github.com/Swoking/symfony-sk-plugin/tree/main/plugins/symfony-sk/skills/api-dto
Command: npx skills add https://github.com/Swoking/symfony-sk-plugin --skill symfony-sk-api-dto

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create Data Transfer Objects with validation attributes to simplify and enforce API input validation across Symfony applications.

Core Features & Use Cases

  • Defines <Feature>Dto classes at api/src/Dto/<Feature>/<Name>Dto.php
  • Uses StarterKit attributes like StringProperty and DateProperty to validate fields
  • Integrates with error-code and autoform workflows for error handling and form generation

Quick Start

Create a new <Name>Dto in api/src/Dto/<Feature> with required fields using the provided template.

Frequently Asked Questions about symfony-sk:api-dto

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create Symfony DTOs with validation attributes for API endpoints?

Symfony DTOs use StarterKit attributes like StringProperty and DateProperty to enforce strongly typed validation on incoming structured API data. This approach integrates with error-code and autoform workflows to streamline error handling and form generation.

How do I validate incoming API data in a Symfony application?

You validate incoming API data in Symfony by mapping it to strongly typed DTO classes using validation attributes. This ensures structured data conforms to expected types and formats before reaching your business logic.

What is the best way to structure API Data Transfer Objects in Symfony?

The best way to structure API Data Transfer Objects in Symfony is to place them at api/src/Dto/<Feature>/<Name>Dto.php, using StarterKit attributes to define field constraints and integrate with autoform workflows.

Can I use autoform workflows with Symfony DTOs?

Yes, you can use autoform workflows with Symfony DTOs. The DTOs integrate with autoform and error-code workflows to automatically handle error reporting and form generation based on the defined validation attributes.

Do I need StarterKit attributes for API DTO validation in Symfony?

Yes, StarterKit attributes are required for API DTO validation in Symfony. You must use attributes like StringProperty and DateProperty to ensure fields are strongly typed and properly validated against incoming structured data.