pub struct AllOf {
pub items: Vec<RefOr<Schema>>,
pub schema_type: SchemaType,
pub title: Option<String>,
pub description: Option<String>,
pub default: Option<Value>,
pub example: Option<Value>,
pub examples: Vec<Value>,
pub discriminator: Option<Discriminator>,
pub extensions: Option<Extensions>,
}
Expand description
AllOf Composite Object component holds multiple components together where API endpoint will return a combination of all of them.
See Schema::AllOf
for more details.
Fields§
§items: Vec<RefOr<Schema>>
Components of AllOf component.
schema_type: SchemaType
Type of AllOf
e.g. SchemaType::new(Type::Object)
for object
.
By default this is SchemaType::AnyValue
as the type is defined by items
themselves.
title: Option<String>
Changes the AllOf
title.
description: Option<String>
Description of the AllOf
. Markdown syntax is supported.
default: Option<Value>
Default value which is provided when user has not provided the input in Swagger UI.
example: Option<Value>
Example shown in UI of the value for richer documentation.
Deprecated since 3.0.x. Prefer AllOf::examples
instead
examples: Vec<Value>
Examples shown in UI of the value for richer documentation.
discriminator: Option<Discriminator>
Optional discriminator field can be used to aid deserialization, serialization and validation of a specific schema.
extensions: Option<Extensions>
Optional extensions x-something
.
Implementations§
Source§impl AllOf
impl AllOf
Sourcepub fn builder() -> AllOfBuilder
pub fn builder() -> AllOfBuilder
Construct a new AllOfBuilder.
This is effectively same as calling AllOfBuilder::new