skema

Str

@Serializable
@SerialName(value = "String")
data class Str(val minLength: Int? = null, val maxLength: Int? = null, val pattern: String? = null, val format: String? = null) : JsonSpec(source)

String value, optionally constrained by length and pattern.

Constructors

Link copied to clipboard
constructor(minLength: Int? = null, maxLength: Int? = null, pattern: String? = null, format: String? = null)

Properties

Link copied to clipboard

JSON Schema format annotation (date-time, email, uri, uuid, ...), or null. Free-form: JSON Schema treats unknown formats as annotations rather than errors.

Link copied to clipboard

Maximum length, or null for unbounded.

Link copied to clipboard

Minimum length, or null for unbounded.

Link copied to clipboard

Regex pattern the value must match, or null for no constraint.

Functions

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

JSON Schema fragment describing the value this primitive validates.

Str

constructor(minLength: Int? = null, maxLength: Int? = null, pattern: String? = null, format: String? = null)(source)

format

JSON Schema format annotation (date-time, email, uri, uuid, ...), or null. Free-form: JSON Schema treats unknown formats as annotations rather than errors.

maxLength

Maximum length, or null for unbounded.

minLength

Minimum length, or null for unbounded.

pattern

Regex pattern the value must match, or null for no constraint.