Types

Link copied to clipboard
enum Form : Enum<Form>

Form represents the eight forms a JTD schema may take on.

Link copied to clipboard

The exception raised from verify on Schema if a schema is invalid.

Link copied to clipboard

Exception thrown when the maximum depth of a schema is exceeded.

Link copied to clipboard

Dummy error to implement maxDepth. Never returned to the user.

Link copied to clipboard
class Schema(val nullable: Boolean = false, val metadata: Map<String, Any>? = null, val ref: String? = null, val type: Type? = null, val enum: Set<String>? = null, val elements: Schema? = null, val properties: Map<String, Schema>? = null, val optionalProperties: Map<String, Schema>? = null, val values: Schema? = null, val discriminator: String? = null, val mapping: Map<String, Schema>? = null, val definitions: Map<String, Schema>? = null)

Represents a JSON Type Definition schema. Modified version of https://github.com/jsontypedef/json-typedef-java/blob/master/src/main/java/com/jsontypedef/jtd/Schema.java

Link copied to clipboard

Fields in JSON Type Definition schemas.

Link copied to clipboard
enum Type : Enum<Type>

Type represents the values the type keyword can take in JTD.

Link copied to clipboard
class ValidationError(val instancePath: List<String>, val schemaPath: List<String>)

Represents a single validation problem, typically returned from verify in Validator.

Link copied to clipboard
@Component
class Validator

Validates schemas against instances, returning a list of validation errors. Modified version of https://github.com/jsontypedef/json-typedef-java/blob/master/src/main/java/com/jsontypedef/jtd/Validator.java

Functions

Link copied to clipboard
private fun JsonNode.asPropertyMap(): Map<String, JsonNode>

Gets the properties of a JsonNode as a map.