Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.5.0] - 2025-12-03

### Added
- **26 Custom Validators** - Complete validation library extending msgspec
- πŸ”’ **Numeric Constraints (8 types)**: `PositiveInt`, `NegativeInt`, `NonNegativeInt`, `NonPositiveInt`, `PositiveFloat`, `NegativeFloat`, `NonNegativeFloat`, `NonPositiveFloat`
- 🌐 **Network & Hardware (4 types)**: `IPv4Address`, `IPv6Address`, `IPvAnyAddress`, `MacAddress`
- βœ‰οΈ **String Validators (4 types)**: `EmailStr`, `HttpUrl`, `AnyUrl`, `SecretStr`
- πŸ—„οΈ **Database (3 types)**: `PostgresDsn`, `RedisDsn`, `PaymentCardNumber`
- πŸ“ **Path Validators (2 types)**: `FilePath`, `DirectoryPath`
- πŸ’Ύ **Storage & Dates (3 types)**: `ByteSize`, `PastDate`, `FutureDate`
- 🎯 **Constrained Strings (2 types)**: `ConStr`
- **msgspec.Struct Support** - All validators now work seamlessly with both `BaseSettings` and `msgspec.Struct`
- **Serialization Hooks** - `dec_hook` and `enc_hook` for JSON/MessagePack serialization
- **Re-exported msgspec types** - `Raw` and `UNSET` for convenience
- Comprehensive integration tests (18 new tests, 220 total)
- Advanced validator examples (`examples/07_advanced_validators.py`)

### Changed
- **Enhanced README** - Complete overhaul emphasizing dual nature: settings management AND validation library
- **Use Cases Section** - Real-world examples for API validation, configuration files, and message queues
- **Documentation** - Added output examples for `model_dump()` and `model_dump_json()`
- **Project Description** - Updated to reflect evolution from settings-only to comprehensive validation library

### Documentation
- Added msgspec.Struct usage examples throughout README
- Documented all 26 validators with code examples
- Added "Type Support" section linking to msgspec native types
- Improved Quick Start with both BaseSettings and msgspec.Struct examples
- Added practical use cases: API Request/Response, Config Files, Message Queues

### Developer Experience
- All validators type-safe and fully documented
- Works with both environment variables (BaseSettings) and direct JSON/MessagePack (msgspec.Struct)
- Zero breaking changes - fully backward compatible

## [0.4.0] - 2025-12-03

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/msgspec_ext/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.0"
__version__ = "0.5.0"
Loading