pub struct Property {
    pub component_type: ComponentType,
    pub format: Option<ComponentFormat>,
    pub description: Option<String>,
    pub default: Option<Value>,
    pub enum_values: Option<Vec<String>>,
    pub example: Option<Value>,
    pub deprecated: Option<Deprecated>,
    pub write_only: Option<bool>,
    pub read_only: Option<bool>,
    pub xml: Option<Xml>,
}
Expand description

Implements special subset of OpenAPI Schema Object which can be used to define field property or enum values or type for array items.

Fields

component_type: ComponentType

Type of the property e.g ComponentType::String.

format: Option<ComponentFormat>

Additional format for detailing the component type.

description: Option<String>

Description of the property. Markdown syntax is supported.

default: Option<Value>

Default value for the property which is provided when user has not provided the input.

enum_values: Option<Vec<String>>

Enum type property possible variants.

example: Option<Value>

Example shown in UI of the value for richier documentation.

deprecated: Option<Deprecated>

Changes the Property deprecated status.

write_only: Option<bool>

Write only property will be only sent in write requests like POST, PUT.

read_only: Option<bool>

Read only property will be only sent in read requests like GET.

xml: Option<Xml>

Additional Xml formatting of the Property.

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.