skema

Annotated

@Serializable
@SerialName(value = "Annotated")
data class Annotated(val inner: JsonSpec, val title: String? = null, val description: String? = null, val default: JsonElement? = null, val examples: List<JsonElement>? = null, val deprecated: Boolean? = null, val readOnly: Boolean? = null, val writeOnly: Boolean? = null, val comment: String? = null) : JsonSpec(source)

Wraps another JsonSpec with JSON Schema annotations. Annotations decorate the inner spec without changing the values it accepts.

Constructors

Link copied to clipboard
constructor(inner: JsonSpec, title: String? = null, description: String? = null, default: JsonElement? = null, examples: List<JsonElement>? = null, deprecated: Boolean? = null, readOnly: Boolean? = null, writeOnly: Boolean? = null, comment: String? = null)

Properties

Link copied to clipboard

Non-validating comment, ignored by validators.

Link copied to clipboard
val default: JsonElement?

Default value, used by generators and form-renderers.

Link copied to clipboard

Marks the value as deprecated.

Link copied to clipboard

Longer human-readable explanation.

Link copied to clipboard
val examples: List<JsonElement>?

Example values, used by documentation.

Link copied to clipboard

The spec being annotated.

Link copied to clipboard

Marks the value as read-only (e.g., server-assigned).

Link copied to clipboard

Short human-readable label.

Link copied to clipboard

Marks the value as write-only (e.g., passwords).

Functions

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

JSON Schema fragment describing the value this primitive validates.

Annotated

constructor(inner: JsonSpec, title: String? = null, description: String? = null, default: JsonElement? = null, examples: List<JsonElement>? = null, deprecated: Boolean? = null, readOnly: Boolean? = null, writeOnly: Boolean? = null, comment: String? = null)(source)

comment

Non-validating comment, ignored by validators.

default

val default: JsonElement?(source)

Default value, used by generators and form-renderers.

deprecated

Marks the value as deprecated.

description

Longer human-readable explanation.

examples

val examples: List<JsonElement>?(source)

Example values, used by documentation.

inner

The spec being annotated.

readOnly

Marks the value as read-only (e.g., server-assigned).

title

Short human-readable label.

writeOnly

Marks the value as write-only (e.g., passwords).