Struct utoipa::openapi::schema::AnyOfBuilder
source · 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: Into<RefOr<Schema>>>(self, component: I) -> Self
pub fn item<I: Into<RefOr<Schema>>>(self, component: I) -> Self
Adds a given Schema
to AnyOf
Composite Object
sourcepub fn description<I: Into<String>>(self, description: Option<I>) -> Self
pub fn description<I: Into<String>>(self, description: Option<I>) -> Self
Add or change optional description for AnyOf
component.
sourcepub fn default(self, default: Option<Value>) -> Self
pub fn default(self, default: Option<Value>) -> Self
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>) -> Self
pub fn example(self, example: Option<Value>) -> Self
Add or change example shown in UI of the value for richer documentation.
sourcepub fn discriminator(self, discriminator: Option<Discriminator>) -> Self
pub fn discriminator(self, discriminator: Option<Discriminator>) -> Self
Add or change discriminator field of the composite AnyOf
type.
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§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.
source§impl From<AnyOfBuilder> for RefOr<Schema>
impl From<AnyOfBuilder> for RefOr<Schema>
source§fn from(any_of: AnyOfBuilder) -> Self
fn from(any_of: AnyOfBuilder) -> Self
Converts to this type from the input type.
source§impl From<AnyOfBuilder> for Schema
impl From<AnyOfBuilder> for Schema
source§fn from(builder: AnyOfBuilder) -> Self
fn from(builder: AnyOfBuilder) -> Self
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