pub struct AnyOfBuilder { /* private fields */ }Implementations§
Source§impl AnyOfBuilder
impl AnyOfBuilder
Sourcepub fn new() -> AnyOfBuilder
pub fn new() -> AnyOfBuilder
Constructs a new AnyOfBuilder.
Source§impl AnyOfBuilder
impl AnyOfBuilder
Sourcepub fn item<I>(self, component: I) -> AnyOfBuilder
pub fn item<I>(self, component: I) -> AnyOfBuilder
Adds a given Schema to AnyOf Composite Object.
Sourcepub fn schema_type<T>(self, schema_type: T) -> AnyOfBuilderwhere
T: Into<SchemaType>,
pub fn schema_type<T>(self, schema_type: T) -> AnyOfBuilderwhere
T: Into<SchemaType>,
Add or change type of the object e.g. to change type to string
use value SchemaType::Type(Type::String).
Sourcepub fn description<I>(self, description: Option<I>) -> AnyOfBuilder
pub fn description<I>(self, description: Option<I>) -> AnyOfBuilder
Add or change optional description for AnyOf component.
Sourcepub fn default(self, default: Option<Value>) -> AnyOfBuilder
pub fn default(self, default: Option<Value>) -> AnyOfBuilder
Add or change default value for the object which is provided when user has not provided the input in Swagger UI.
Sourcepub fn example(self, example: Option<Value>) -> AnyOfBuilder
👎Deprecated: Since OpenAPI 3.1 prefer using examples
pub fn example(self, example: Option<Value>) -> AnyOfBuilder
examplesAdd or change example shown in UI of the value for richer documentation.
Deprecated since 3.0.x. Prefer AllOfBuilder::examples instead
Sourcepub fn examples<I, V>(self, examples: I) -> AnyOfBuilder
pub fn examples<I, V>(self, examples: I) -> AnyOfBuilder
Add or change examples shown in UI of the value for richer documentation.
Sourcepub fn discriminator(self, discriminator: Option<Discriminator>) -> AnyOfBuilder
pub fn discriminator(self, discriminator: Option<Discriminator>) -> AnyOfBuilder
Add or change discriminator field of the composite AnyOf type.
Sourcepub fn extensions(self, extensions: Option<Extensions>) -> AnyOfBuilder
pub fn extensions(self, extensions: Option<Extensions>) -> AnyOfBuilder
Add openapi extensions (x-something) for AnyOf.
Sourcepub fn to_array_builder(self) -> ArrayBuilder
pub fn to_array_builder(self) -> ArrayBuilder
Construct a new ArrayBuilder with this component set to ArrayBuilder::items.
Trait Implementations§
Source§impl Default for AnyOfBuilder
impl Default for AnyOfBuilder
Source§fn default() -> AnyOfBuilder
fn default() -> AnyOfBuilder
Returns the “default value” for a type. Read more
Source§impl From<AnyOf> for AnyOfBuilder
impl From<AnyOf> for AnyOfBuilder
Source§fn from(value: AnyOf) -> AnyOfBuilder
fn from(value: AnyOf) -> AnyOfBuilder
Converts to this type from the input type.
Source§impl From<AnyOfBuilder> for AnyOf
impl From<AnyOfBuilder> for AnyOf
Source§fn from(value: AnyOfBuilder) -> AnyOf
fn from(value: AnyOfBuilder) -> AnyOf
Converts to this type from the input type.
Source§impl From<AnyOfBuilder> for ArrayItems
impl From<AnyOfBuilder> for ArrayItems
Source§fn from(value: AnyOfBuilder) -> ArrayItems
fn from(value: AnyOfBuilder) -> ArrayItems
Converts to this type from the input type.
Source§impl From<AnyOfBuilder> for Schema
impl From<AnyOfBuilder> for Schema
Source§fn from(builder: AnyOfBuilder) -> Schema
fn from(builder: AnyOfBuilder) -> Schema
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AnyOfBuilder
impl RefUnwindSafe for AnyOfBuilder
impl Send for AnyOfBuilder
impl Sync for AnyOfBuilder
impl Unpin for AnyOfBuilder
impl UnwindSafe for AnyOfBuilder
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