dto-schema-design
CommunityDesign stable DTO contracts with safe evolution.
Software Engineering#compatibility#validation rules#api contract#schema versioning#dto schema#nullability semantics#mass assignment defense
Authormachenjie
Version1.0.0
Installs0
System Documentation
What problem does it solve?
DTO schema design keeps your external API, event, and integration contracts stable while preventing internal model changes from breaking clients and introducing security risks like mass assignment.
Core Features & Use Cases
- Versioned, contract-first schemas for requests and responses with explicit field types, nullability semantics, defaults, and forward-backward compatibility rules.
- Validation and safety guardrails including strict
additionalPropertiespolicies for request DTOs and clear rejection of unknown fields. - DTO-to-domain mapping discipline using explicit field allowlists to ensure validation occurs before domain logic and internal models never leak to API layers.
Quick Start
Ask the assistant to produce a versioned request/response DTO schema that clearly distinguishes null vs absent semantics, enforces strict input validation, and includes an allowlisted mapping strategy to the domain command.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: dto-schema-design Download link: https://github.com/machenjie/rd-skills/archive/main.zip#dto-schema-design Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.