skema

Nullable

@Serializable
@SerialName(value = "Nullable")
data class Nullable(val inner: JsonSpec) : JsonSpec(source)

Wraps a JsonSpec so the value may also be null. Renders as {"anyOf":[<inner>, {"type":"null"}]}. Equivalent to OneOf(inner, Null) but spells the intent out.

Constructors

Link copied to clipboard
constructor(inner: JsonSpec)

Properties

Link copied to clipboard

The non-null spec.

Functions

Link copied to clipboard
fun JsonSpec.toJsonSchema(): JsonObject

JSON Schema fragment describing the value this primitive validates.

Nullable

constructor(inner: JsonSpec)(source)

inner

The non-null spec.