Skip to content

v0.15.0

Latest

Choose a tag to compare

@ajevans99 ajevans99 released this 12 Nov 07:07
· 6 commits to main since this release
a00dde5

Adds construction-scoped typed schema documents with .namedTypes and .reusedTypes reference policies, built-in CGFloat support, and fixes for schema construction, reference caching, validation, and Draft 2020-12 annotations.

What's Changed

  • Add built-in CGFloat support and fix Float schema inference by @ajevans99 in #208
  • Fail closed when pattern regex cannot compile by @ajevans99 in #212
  • Count minLength/maxLength in Unicode code points by @Jiansiyu in #210
  • Updated dependencies to latest versions by @ls-philippe-casgrain in #220
  • Fix Draft 2020-12 URI format validation by @Copilot in #219
  • Investigate JSONValue Codable decoding overhead and optimize keyed container decoding by @Copilot in #217
  • Fix nested schema construction overflowing small stacks by @csueiras in #222
  • Reduce repeated JSON Schema validation costs by @Copilot in #202
  • Fix remote schema caching through retrieval aliases by @ajevans99 in #223
  • Update JSON Schema conformance suite and meta-schema coverage by @ajevans99 in #224
  • Fix Draft 2020-12 annotation conformance by @ajevans99 in #227
  • Add construction-scoped typed schema documents by @ajevans99 in #209
  • Add .reusedTypes policy to SchemaDocument (stacked on #209) by @ajevans99 in #213

Breaking Changes

  • Invalid regular expressions: pattern and patternProperties now fail closed when Swift cannot compile the expression instead of silently ignoring it. This includes some ECMA-262-valid patterns unsupported by Swift Regex. Exhaustive switches over ValidationIssue must handle the new invalidPattern(pattern:) case.
  • String length validation: minLength and maxLength count Unicode code points rather than grapheme clusters, as required by JSON Schema. Results can change for strings containing combining characters.
  • Annotation output: Results now preserve separate source-specific annotations and include resource-aware absolute locations. Update annotation-output snapshots accordingly.

Ordinary Type.schema output remains inline. Opting into SchemaDocument changes exported structure and diagnostic paths to use $defs/$ref; both reference policies ship together in this release.

Full Changelog: v0.14.2...v0.15.0