pub struct SchemaValue {Show 16 fields
pub kind: SchemaKind,
pub nullable: bool,
pub optional: bool,
pub nullish: bool,
pub format: Option<String>,
pub enum_values: Vec<Value>,
pub const_value: Option<Value>,
pub default: Option<Value>,
pub title: Option<String>,
pub description: Option<String>,
pub deprecated: bool,
pub read_only: bool,
pub write_only: bool,
pub discriminator: Option<Discriminator>,
pub constraints: BTreeMap<String, Value>,
pub extensions: BTreeMap<String, Value>,
}Expand description
A recursively composable API type. This is deliberately target neutral:
plugins decide whether (for example) String { format: uuid } becomes a
branded TypeScript string, a Python UUID, or a Rust uuid::Uuid.
Fields§
§kind: SchemaKind§nullable: bool§optional: boolA target-neutral schema wrapper for contexts which retain optionality on the value rather than on an enclosing object property.
nullish: boolA target-neutral schema wrapper for values which accept either null
or undefined. OpenAPI itself normally models this through a nullable,
non-required property, but retaining it makes lossless adapters and
schema generators possible.
format: Option<String>§enum_values: Vec<Value>§const_value: Option<Value>§default: Option<Value>§title: Option<String>§description: Option<String>§deprecated: bool§read_only: bool§write_only: bool§discriminator: Option<Discriminator>§constraints: BTreeMap<String, Value>Validation keywords and vendor-neutral OpenAPI keywords which do not alter the structural shape. Keeping them here means an adapter does not throw away constraints that a target plugin may support later.
extensions: BTreeMap<String, Value>Unknown x-* and future schema keywords. This is a forward-compatible
lossless escape hatch; core generators must not depend on it.