AirshipJsonSchema
class AirshipJsonSchema @JvmOverloads constructor(val type: AirshipJsonSchema.ValueType, val description: String? = null, extensions: Map<String, JsonValue> = emptyMap()) : JsonSerializable(source)
Describes the structured JSON output an AI evaluation expects from a model.
A recursive JSON Schema type node, so the output can be an object, an array, or a bare scalar:
{ "type": "object", "properties": { "result": { "type": "string", "enum": ["a", "b"] } }, "required": ["result"] }
{ "type": "array", "items": { "type": "string" } }Content copied to clipboard
Properties are unordered, and per JSON Schema a property is optional unless listed in required. Backend agnostic and in core, so payload-driven features can decode a schema without depending on an AI module.
Parameters
type
The expected shape of the value.
description
Optional natural-language description, surfaced to the model.
extensions
JSON Schema vendor extensions (x-*) carried verbatim as opaque JSON, so new ones round-trip without parser changes. Keys without the prefix, and keys whose value is null, are dropped; validate ignores the rest — they are metadata for other consumers.
Constructors
Link copied to clipboard
constructor(type: AirshipJsonSchema.ValueType, description: String? = null, extensions: Map<String, JsonValue> = emptyMap())