pub struct AnyOf {
pub items: Vec<RefOr<Schema>>,
pub description: Option<String>,
pub default: Option<Value>,
pub example: Option<Value>,
pub discriminator: Option<Discriminator>,
pub nullable: bool,
}
Expand description
AnyOf Composite Object component holds multiple components together where API endpoint will return a combination of one or more of them.
See Schema::AnyOf
for more details.
Fields§
§items: Vec<RefOr<Schema>>
Components of _AnyOf component.
description: Option<String>
Description of the AnyOf
. 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.
discriminator: Option<Discriminator>
Optional discriminator field can be used to aid deserialization, serialization and validation of a specific schema.
nullable: bool
Set true
to allow "null"
to be used as value for given type.
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for AnyOf
impl<'de> Deserialize<'de> for AnyOf
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<AnyOf> for AnyOfBuilder
impl From<AnyOf> for AnyOfBuilder
source§impl From<AnyOfBuilder> for AnyOf
impl From<AnyOfBuilder> for AnyOf
source§fn from(value: AnyOfBuilder) -> Self
fn from(value: AnyOfBuilder) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for AnyOf
Auto Trait Implementations§
impl Freeze for AnyOf
impl RefUnwindSafe for AnyOf
impl Send for AnyOf
impl Sync for AnyOf
impl Unpin for AnyOf
impl UnwindSafe for AnyOf
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)