typespec-validation
CommunityEnforce runtime data constraints with TypeSpec.
Software Engineering#constraints#typespec#json-schema#runtime-validation#decorators#data-validation#error-types
Authorhafley66
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Data validation for TypeSpec models to ensure runtime correctness through decorators, constraints, formats, and JSON Schema validation, enabling consistent data shapes and predictable errors across services.
Core Features & Use Cases
- Validation decorators (@pattern, @minValue, @maxValue, @minLength, @maxLength)
- Format constraints (@format for uuid, email, uri, date-time)
- JSON Schema emission for runtime validation
- Custom error types extending Error<T>
- Unique item and secret field support
- Applicable to data models, API payloads, and data processing pipelines
Quick Start
Define your TypeSpec model and apply decorators to enforce constraints and generate JSON Schema for runtime validation.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 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: typespec-validation Download link: https://github.com/hafley66/claude-research/archive/main.zip#typespec-validation 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.