CHANGELOG.md

# Changelog

All notable changes to this project will be documented in this file.

## [0.10.1] - 2025-08-11

### ๐Ÿš€ Features

- Export required keys from generated struct modules

### โš™๏ธ Miscellaneous Tasks

- Fix JSON tests for elixir 1.17

## [0.10.0] - 2025-07-10

### ๐Ÿš€ Features

- Define and expect schema modules to export json_schema/0 instead of schema/0
- Allow to call defschema with a list of properties
- Added the defschema/3 macro to define schemas as submodules

### ๐Ÿ› Bug Fixes

- Ensure defschema with keyword syntax supports module-based properties

## [0.9.0] - 2025-07-05

### ๐Ÿš€ Features

- Provide a schema representing normalized validation errors
- Deprecated the schema composition API in favor of presets

### ๐Ÿ› Bug Fixes

- Emit a build error with empty oneOf/allOf/anyOf
- Reset errors when using a detached validator
- Ensure casts are applied after all validations
- Revert default normalized error to atoms

### โš™๏ธ Miscellaneous Tasks

- Define titles for normal validation error schemas

## [0.8.1] - 2025-06-29

### โš™๏ธ Miscellaneous Tasks

- Export the locals_without_parens formatter opts for public macros

## [0.8.0] - 2025-06-23

### ๐Ÿš€ Features

- Declare formatting support from main JSON codec
- Added the JSV.validate! bang functions
- Added explicit error when a sub schema is not buildable
- Export JSV.resolver_chain/1 for integration in 3rd parties
- [**breaking**] Defschema does not automatically define $id anymore
- Added string_to_number and string_to_boolean casters
- Return sub errors when oneOf has no matches
- Order sub-errors by ascending item index in array validation
- Added ability to build only a nested schema or multiple schemas
- Expose the map extensions helpers
- Added the prewalk traverse utility for schema normalization
- [**breaking**] Error normalizer will now sort error by instanceLocation
- [**breaking**] Changed caster tag of defschema to 0
- Allow custom formats to validate other types than strings
- Provide a function to create reference from a list of path segments

### ๐Ÿ› Bug Fixes

- Ensure keys are json-pointer encoded in instanceLoction in errors
- Return meaningful error for unknow keys in :required in defschema
- Fixed typespec on JSV.build_key!
- Fixed typespec and argument name in Builder.build!

### ๐Ÿšœ Refactor

- Renamed Schema.override/2 to Schema.merge/2
- Defined different typespecs for normal schema and native schema
- Build error will now be raised with a proper stacktrace
- Removed useless accumulation of atoms when normalizing schemas
- [**breaking**] Changed order of arguments for Normalizer.normalize/3
- Renamed build_root to to_root as it is not building validators

### ๐Ÿ“š Documentation

- Rework Decimal support limitations

### ๐Ÿงช Testing

- Verify that unknown formats are ignored when formats assertion is disabled

### โš™๏ธ Miscellaneous Tasks

- Clarify defschema error when no properties are given
- Fix warning when Poison.EncodeError is not defined
- Updated JSON Schema Test Suite
- Renamed keycast module attribute to jsv_keycast in defschema
- Provide correct line/column in debanged functions
- Allow to customize Inspect for Builder and Resolver
- Fix Elixir 1.19 warnings

## [0.7.2] - 2025-05-08

### ๐Ÿš€ Features

- Added the non_empty_string schema helper
- Atom enums will use string_to_atom to support compile-time builds

### โš™๏ธ Miscellaneous Tasks

- Updated JSON Schema Test Suite
- Enhanced JSTS updater
- Fixed warning on code when Decimal is missing

## [0.7.1] - 2025-04-27

### ๐Ÿ› Bug Fixes

- Fixed hex package definition

## [0.7.0] - 2025-04-27

### ๐Ÿš€ Features

- Mail_address dependency is no longer used
- Validation support for Decimal

### ๐Ÿ“š Documentation

- Updated doc examples with generated code

### ๐Ÿงช Testing

- Enable tests for the 'uuid' format
- Enable tests for the 'hostname' format
- Enable tests for all uri/iri/pointer formats

### โš™๏ธ Miscellaneous Tasks

- Changed JSON schema test suite updater

## [0.6.3] - 2025-04-13

### โš™๏ธ Miscellaneous Tasks

- Fix missing file in hex package breaking installs

## [0.6.2] - 2025-04-13

### ๐Ÿš€ Features

- Added Jason/Poison/JSON encoder implementations for JSV.NValidationError

## [0.6.1] - 2025-04-13

### โš™๏ธ Miscellaneous Tasks

- Use mix_version for release process

## [0.6.0] - 2025-04-13

### ๐Ÿš€ Features

- Resolvers do not need to normalize schemas anymore
- Added support to override existing vocabularies
- Schema definition helpers do not enforce a Schema struct anymore
- Provide a generic JSON normalizer for data and schemas
- Allow resolvers to mark schemas as normalized
- [**breaking**] Use jsv-cast keyword in schemas for struct and cast functions

### ๐Ÿ› Bug Fixes

- Removed conversion to string in codec format_to_iodata

### ๐Ÿ“š Documentation

- Fix documentation grammar and typos
- Organize docs sidebar in categories

### โš™๏ธ Miscellaneous Tasks

- Update Elixir Github workflow (#17)
- Use absolute path for JSTS ref file

## [0.5.1] - 2025-03-28

### ๐Ÿ› Bug Fixes

- Fixed compilation with Mix.install

### โš™๏ธ Miscellaneous Tasks

- Release v0.5.1

## [0.5.0] - 2025-03-25

### ๐Ÿš€ Features

- Added JSV.Resolver.Local to resolve disk stored schemas
- Special error format for additionalProperties:false
- Provide correct schemaLocation in all errors
- Added defschema_for to use different modules for schema and struct
- Provide ordered JSON encoding with native JSON modules

### ๐Ÿ› Bug Fixes

- Check presence of JSON module in CI

### ๐Ÿงช Testing

- Make JSON codecs easier to test
- Fixed assertions for JSON codec on old OTP versions

### โš™๏ธ Miscellaneous Tasks

- Refactored schema normalization
- Removed unused alias
- Use readmix to generate formats docs

## [0.4.0] - 2025-02-08

### ๐Ÿš€ Features

- Support module-based schemas with structs

## [0.3.0] - 2025-01-08

### ๐Ÿš€ Features

- Added a default resolver using static schemas

### ๐Ÿ› Bug Fixes

- Upgrade abnf_parsec to correctly parse IRIs and IRI references

## [0.2.0] - 2025-01-03

### ๐Ÿ“š Documentation

- Document atom conversion
- Document functions with doc and spec

## [0.1.0] - 2025-01-01

<!-- generated by git-cliff -->