Changelog
All notable changes to Pedantigo are documented here.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[1.1.0] - 2025-12-27
Changed
What's Changed
- feat(constraints): add validator-compatible constraints and APIs by @tushar2708 in https://github.com/SmrutAI/pedantigo/pull/8
[1.0.0] - 2025-12-21
Changed
What's Changed
- feat: add go-playground/validator v10 compatible constraints and features by @tushar2708 in https://github.com/SmrutAI/pedantigo/pull/6
- test(schema): add JSON Schema spec compliance validation by @tushar2708 in https://github.com/SmrutAI/pedantigo/pull/7
[0.1.2] - 2025-12-20
Changed
- docs: improve documentation discoverability and examples by @tushar2708 in https://github.com/SmrutAI/pedantigo/pull/4
- feat(extras): implement ExtraAllow mode for capturing unknown JSON fields by @tushar2708 in https://github.com/SmrutAI/pedantigo/pull/5
[0.1.1] - 2025-12-20
Changed
- feat: custom struct tag support + CI/CD improvements by @tushar2708 in https://github.com/SmrutAI/pedantigo/pull/1
- fix: flaky test due to map iteration order by @tushar2708 in https://github.com/SmrutAI/pedantigo/pull/2
- test: improve coverage for deserialize and schemagen packages by @tushar2708 in https://github.com/SmrutAI/pedantigo/pull/3
[0.1.0] - 2024-12-18
Initial release of Pedantigo - Pydantic-inspired validation for Go.
Added
Core Validation
- Struct tag-based validation with
pedantigo:"..."tags - 100+ built-in validation constraints
- Detailed error messages with field paths
- Support for nested structs and slices
Simple API (Recommended)
Unmarshal[T]()- Parse JSON and validate in one callNewModel[T]()- Create validated instances from JSON, maps, or structsValidate[T]()- Validate existing struct instancesSchema[T]()- Get cached JSON SchemaSchemaJSON[T]()- Get JSON Schema as bytesMarshal[T]()- Validate and marshal to JSONDict[T]()- Convert struct to map
Validator API (Advanced)
Validator[T]struct for custom configurationsValidatorOptionsfor strict mode, extra fields handlingExtraFieldsMode: Ignore, Forbid, or Allow extra JSON fields
JSON Schema Generation
- Automatic generation from struct definitions
- 240x speedup with caching (via
SchemaRegistry) - OpenAPI 3.0 compatible output
Streaming Validation
StreamParserfor partial JSON validation- Real-time validation of LLM streaming responses
- Progress callbacks for incremental updates
Discriminated Unions
Union[A, B, C]type for type-safe unions- Automatic discriminator detection
- JSON Schema
oneOfsupport
Field Types
Secret[T]- Masks sensitive values in logs/JSON- Pointer support for optional fields
- Custom type support via
Validatableinterface