SchemaDef
Properties
Functions
Link copied to clipboard
Prefix every entry name (default separator .).
Link copied to clipboard
JSON Schema (draft 2020-12) for a schema whose entries are JsonSpecs. All entries are emitted as required; post-process the result if a different required-set is needed. Supply defs to populate the root $defs block; reference them with JsonSpec.Ref("#/${'$'}defs/<name>").
fun <C : Any> SchemaDef<C>.toJsonSchema(defs: Map<String, JsonSpec> = emptyMap(), map: (C) -> JsonObject): JsonObject
JSON Schema (draft 2020-12) for an arbitrary config vocabulary. Supply a mapper that turns each entry's config into a JSON Schema fragment for the value it validates. For mixed hierarchies, call JsonSpec.toJsonSchema inside the lambda for the JsonSpec branches. Supply defs to populate the root $defs block.