v14.1.0
π What's New in v14.1.0
This release adds complete OpenAPI 3.1.0 support while maintaining 100% backward compatibility with existing code.
β¨ Major Features
1. OpenAPI 3.1.0 Full Support
- β Upgraded from OpenAPI 3.0.2 to 3.1.0
- β Complete JSON Schema Draft 2020-12 support
- β
jsonSchemaDialectproperty added to OpenAPI documents - β All OpenAPI 3.1 features available
2. Backward Compatibility Layer
- β
JSON_SCHEMA_DRAFT_7alias maintains compatibility with existing code - β No breaking changes - existing code continues to work
- β Gradual migration path available
- β
Legacy
nullableproperty still supported
3. New JSON Schema Draft 2020-12 Features
dependentRequired - Make fields required based on other fields:
{
"properties": {
"creditCard": { "type": "boolean" },
"cardNumber": { "type": "string" },
"billingAddress": { "type": "string" }
},
"dependentRequired": {
"creditCard": ["cardNumber", "billingAddress"]
}
}dependentSchemas - Apply conditional schemas:
{
"dependentSchemas": {
"creditCard": {
"properties": {
"cardType": { "enum": ["visa", "mastercard"] }
},
"required": ["cardType"]
}
}
}Other new features:
prefixItemsfor tuple validationconstfor constant valuescontentSchemafor encoded content validation- Enhanced schema references with
$dynamicRef
4. Comprehensive Test Suite
- β 15 new tests specifically for OpenAPI 3.1 features
- β 302 total tests passing (100% pass rate)
- β 97.8% code coverage maintained
- β Tests for backward compatibility
π¦ Dependencies
- openapi-police:
4.0.5β5.0.0-beta.1(OpenAPI 3.1 support)
π Migration Guide
No changes required! Your existing code will continue to work:
// This still works
import { JSON_SCHEMA_DRAFT_7 } from 'arrest';
// But you can also use the new name
import { JSON_SCHEMA_DRAFT_2020_12 } from 'arrest';To adopt new features:
- Start using OpenAPI 3.1 features in your schemas
- Update
nullable: truetotype: ["string", "null"](optional) - Leverage new Draft 2020-12 validators
π Statistics
- Tests: 302 passing (216 core + 71 MongoDB + 15 OpenAPI 3.1)
- Coverage: 97.8% (non-MongoDB code)
- Build: TypeScript compiles successfully
- Breaking Changes: None
π Bug Fixes
No bug fixes in this release - pure feature addition.
π Commits
- 4e1333d chore: bump version to 14.1.0
- 0a139d3 Add OpenAPI 3.1 backward compatibility and comprehensive tests
- 78096a2 Merge feature/openapi-3.1-support: Add OpenAPI 3.1 support
π Resources
β οΈ Known Issues
- MongoDB tests require port 27017 to be available
- Some validation features in
dependentRequiredmay require openapi-police updates
Full Changelog: v14.0.1...v14.1.0