Skip to main content
Version: Next

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 (bare validator.go at module root, before the move to the validator/ 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 pedantigo to validate — rename tags to validate: or call SetTagName("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

What's Changed


[1.1.2] - 2026-01-06

Changed

What's Changed


[1.1.1] - 2026-01-05

Changed

What's Changed


[1.1.0] - 2025-12-27

Changed

What's Changed


[1.0.0] - 2025-12-21

Changed

What's Changed


[0.1.2] - 2025-12-20

Changed


[0.1.1] - 2025-12-20

Changed


[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
  • Unmarshal[T]() - Parse JSON and validate in one call
  • NewModel[T]() - Create validated instances from JSON, maps, or structs
  • Validate[T]() - Validate existing struct instances
  • Schema[T]() - Get cached JSON Schema
  • SchemaJSON[T]() - Get JSON Schema as bytes
  • Marshal[T]() - Validate and marshal to JSON
  • Dict[T]() - Convert struct to map

Validator API (Advanced)

  • Validator[T] struct for custom configurations
  • ValidatorOptions for strict mode, extra fields handling
  • ExtraFieldsMode: 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

  • StreamParser for 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 oneOf support

Field Types

  • Secret[T] - Masks sensitive values in logs/JSON
  • Pointer support for optional fields
  • Custom type support via Validatable interface