Releases: konform-kt/konform
Releases · konform-kt/konform
0.4.0: Kotlin 1.6, nested onEach
0.3.0: Kotlin 1.4 + JS IR Backend
- Upgrade to Kotlin 1.4
- Enable new JS IR Backend (Thanks to @jillesvangurp)
- Publish directly to MavenCentral due to sunset of Bintray
Subset of JSON Schema Validations
Konform now supports this list of validations from the JSON Schema spec
For Any instance
- type: Check the type of the value (subtype of the declared type)
- enum: Value must be one of the specified values, can also validate Strings based on Kotlin enum classes
- const: Value must be equal to the specified value
For Numbers
- multipleOf: Value must be a multiple of the given value
- maximum: Inclusive upper bound on Number
- exclusiveMaximum: Exclusive upper bound on Number
- minimum: Inclusive lower bound on Number
- exclusiveMinimum: Exclusive lower bound on Number
For Strings
- minLength: Check minimum length of String
- maxLength: Check maximum length of String
- pattern: Validate using a regex pattern
For Arrays and Iterables
- minSize: Array must contain a minimum number of items
- maxSize: Array must not contain more than a maximum number of items
- uniqueItems: All items in the Array must be unique
For Maps
- minSize: Map must contain a minimum number of key value pairs
- maxSize: Map must not contain more than a maximum number of key value pairs
Collection support
This release supports validation of collections:
- Array
- Iterable (List, ...)
- Map
Next steps:
v0.1.0
Library of default constraints similar to JSON Schemav0.2.0
i18n and l10n support for hints
Proof of concept
Initial release in pretty much proof of concept state.
What's working:
- Type-safe builder
- Works with properties on data classes
- Recursively validate nested data classes
- Validate nullable properties
- Simple Hint/Error string interpolation with values from constraints
Next steps:
v0.0.2
Validation of collection type propertiesv0.1.0
Library of default constraints similar to JSON Schemav0.2.0
i18n and l10n support for hints