Rust

schema

Module

The canonical schema tree.

A Schema is one node: the annotations every kind shares (title, description, nullable, default, enum, format, ...) and its SchemaKind. References stay unexpanded (SchemaKind::Reference): recursive schema graphs are legal, so reading never follows them; Specification::resolve_schema follows a chain of them on request.

Contents

use utopia_openapi::Annotations;
Rust
pub struct Annotations

The annotations every schema kind shares, for building a schema (CompositeSchema::compose); a Schema carries them as its own fields.

use utopia_openapi::ArraySchema;
Rust
pub struct ArraySchema

The keywords of an array schema.

use utopia_openapi::CompositeSchema;
Rust
pub struct CompositeSchema

oneOf, anyOf or allOf over member schemas, and/or not.

use utopia_openapi::Condition;
Rust
pub struct Condition

A property that must hold one literal value.

use utopia_openapi::ConditionalReference;
Rust
pub struct ConditionalReference

One member of a union, recognised by required literal properties.

use utopia_openapi::Discriminator;
Rust
pub struct Discriminator

The discriminator of a composite schema.

use utopia_openapi::NumericSchema;
Rust
pub struct NumericSchema

The keywords of an integer or number schema.

use utopia_openapi::ObjectSchema;
Rust
pub struct ObjectSchema

The keywords of an object schema.

use utopia_openapi::Schema;
Rust
pub struct Schema

One node of the schema tree.

use utopia_openapi::StringSchema;
Rust
pub struct StringSchema

The keywords of a string schema.

use utopia_openapi::AdditionalProperties;
Rust
pub enum AdditionalProperties

What additionalProperties allows.

use utopia_openapi::Composition;
Rust
pub enum Composition

How a composite schema combines its members.

use utopia_openapi::SchemaKind;
Rust
pub enum SchemaKind

The kind of a schema, with the keywords only that kind has.