You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Using Direct JSON Schema Converters](#using-direct-json-schema-converters)
@@ -67,6 +68,7 @@ Schema Forge is a powerful TypeScript library that transforms your TypeScript cl
67
68
- 📝 Built-in structured output formatting for various LLM providers
68
69
- 📦 TypeScript-first with full type safety and inference
69
70
- 🪶 Lightweight with minimal dependencies (only requires reflect-metadata)
71
+
- 🔗 Automatic class-validator integration: infers JSON Schema constraints from validation decorators when used
70
72
71
73
## Who Should Use This Library?
72
74
@@ -496,6 +498,87 @@ Schema Forge uses TypeScript's reflection capabilities to automatically infer mo
496
498
497
499
All other primitive types (string, number, boolean) and custom classes are automatically inferred without additional type specification.
498
500
501
+
### Class-Validator Integration
502
+
503
+
If you're using [class-validator](https://github.com/typestack/class-validator) decorators in your project, Schema Forge will automatically infer JSON Schema constraints from them. This means you can define validation rules once and have them reflected in your generated schemas.
0 commit comments