skema

Changelog

Synced from GitHub Releases.

  1. v0.3.0

    This release adds a built-in JSON Schema vocabulary to skema. Schemas whose config type is JsonSpec now render to a full JSON Schema document with no mapper required, and schemas with their own config types can opt in per entry through the mapper overload.

    What's changed

    • feat: add JsonSpec sealed type covering JSON Schema draft 2020-12
    • feat: add primitive variants Bool, Null, Int, Long, Num, Str, Enum, Const
    • feat: support numeric bounds: min, max, exclusiveMin, exclusiveMax, multipleOf
    • feat: support string bounds: minLength, maxLength, pattern, format
    • feat: add compound variants Array and Object with full per-spec configuration
    • feat: add composition operators OneOf, AnyOf, AllOf, Not
    • feat: add Nullable wrapper as sugar for spec-or-null
    • feat: add IfThenElse for conditional schemas
    • feat: add Ref variant and a defs parameter on toJsonSchema for root-level definitions
    • feat: add Annotated wrapper for title, description, default, examples, deprecated, readOnly, writeOnly, and comment
    • feat: add toJsonSchema extension on SchemaDef returning a draft 2020-12 document

    Full Changelog: https://github.com/Eignex/skema/compare/v0.2.0...v0.3.0

  2. v0.2.0

    What's Changed

    • chore: bump kmp to 1.2.1 and gradle to 9.5.1 #1
    • feat: improve java interop on SchemaDef extension functions #2
    • chore: drop deprecated macosX64 target #3
    • chore: use kotlinx-serialization pinned by kmp plugin #4

    Full Changelog: https://github.com/Eignex/skema/compare/v0.1.1...v0.2.0

  3. v0.1.1

    Patch release fixing inline-function visibility so the register helper works from outside the module.

    • fix: route register's inlined add through a @PublishedApi internal.

    Full Changelog: https://github.com/Eignex/skema/compare/v0.1.0...v0.1.1

  4. v0.1.0

    Initial release of skema, a Kotlin Multiplatform library for schemas that work as both typed Kotlin code and serialized wire data, with the same definition surface serving compile-time access on the producer and runtime by-name decoding on the consumer.

    • feat: provide Schema<C> with assignment (val flag = bool("flag")) and delegate (val flag by bool()) declarators.
    • feat: add SchemaDef<C> as a Map<String, C>-keyed wire wrapper.
    • feat: pin the $type discriminator and suppress defaults via SchemaJson.
    • feat: add SchemaDef.diff for per-entry change detection.
    • feat: add SchemaDef.plus and namespaced for plugin-style composition with strict overlap checking.
    • feat: target JVM, JS, WasmJs, WasmWasi, and native via Kotlin Multiplatform.