Changelog
All notable changes to Pedantigo are documented here.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[2.0.1] - 2026-08-08
Changed
- Retracted v2.0.0 in
go.mod— it was published with a stale pre-restructure layout (barevalidator.goat module root, before the move to thevalidator/subpackage) that got permanently cached on the public Go module proxy before the fix landed. v2.0.1 is the corrected release; use this version or later by @tushar2708
[2.0.0] - 2026-08-06
Changed
Breaking Changes
- Default struct tag changed from
pedantigotovalidate— rename tags tovalidate:or callSetTagName("pedantigo")to keep v1 behavior. - Import path changed to
github.com/SmrutAI/pedantigo/v2(Go semantic import versioning for v2+). - feat!: change default struct tag from pedantigo to validate, feat!: bump module to v2 for pedantigo/v2 import path, ci: pin golangci-lint to go1.25.12 via GOTOOLCHAIN, bump to v2.12.2 by @tushar2708 in https://github.com/SmrutAI/pedantigo/pull/22
- Update README with v2 breaking change details by @tushar2708 in 4922f87
- docs: fix import path casing and missing v2 suffix in code examples by @tushar2708 in 8d4b259
- test: cover pedantigo as an explicit custom tag name by @tushar2708 in 46f1a03
[1.1.4] - 2026-06-21
Changed
Release v1.1.4 with schema improvements, omitempty support, and JSON array examples syntax
[1.1.3] - 2026-02-04
Changed
What's Changed
- test: comprehensive test coverage improvements with lint fixes by @tushar2708 in https://github.com/SmrutAI/pedantigo/pull/13
- feat(schema): add SchemaLLM methods for LLM API compatibility by @tushar2708 in https://github.com/SmrutAI/pedantigo/pull/14
- fix(deserialize): apply defaults to nested struct fields by @tushar2708 in https://github.com/SmrutAI/pedantigo/pull/18
- fix(validator): prevent stack overflow on circular type refs and Validatable re-entrancy by @tushar2708 in https://github.com/SmrutAI/pedantigo/pull/19
What's Changed
- test: comprehensive test coverage improvements with lint fixes by @tushar2708 in https://github.com/SmrutAI/pedantigo/pull/13
- feat(schema): add SchemaLLM methods for LLM API compatibility by @tushar2708 in https://github.com/SmrutAI/pedantigo/pull/14
- fix(deserialize): apply defaults to nested struct fields by @tushar2708 in https://github.com/SmrutAI/pedantigo/pull/18
- fix(validator): prevent stack overflow on circular type refs and Validatable re-entrancy by @tushar2708 in https://github.com/SmrutAI/pedantigo/pull/19
[1.1.2] - 2026-01-06
Changed
What's Changed
- fix(constraints): support decimal values in min/max constraints by @tushar2708 in https://github.com/SmrutAI/pedantigo/pull/10
- test(dive): comprehensive dive tests for all constraints by @tushar2708 in https://github.com/SmrutAI/pedantigo/pull/11
- feat(constraints): implement skip_unless with SkipConstraint interface by @tushar2708 in https://github.com/SmrutAI/pedantigo/pull/12
[1.1.1] - 2026-01-05
Changed
What's Changed
- fix(required): allow zero values when JSON key is present in nested structs by @tushar2708 in https://github.com/SmrutAI/pedantigo/pull/9
[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