pub struct ExampleBuilder { /* private fields */ }Expand description
Implementations§
Source§impl ExampleBuilder
impl ExampleBuilder
Sourcepub fn new() -> ExampleBuilder
pub fn new() -> ExampleBuilder
Constructs a new ExampleBuilder.
Source§impl ExampleBuilder
impl ExampleBuilder
Sourcepub fn summary<S>(self, summary: S) -> ExampleBuilder
pub fn summary<S>(self, summary: S) -> ExampleBuilder
Add or change a short description for the Example. Setting this to empty String
will make it not render in the generated OpenAPI document.
Sourcepub fn description<D>(self, description: D) -> ExampleBuilder
pub fn description<D>(self, description: D) -> ExampleBuilder
Add or change a long description for the Example. Markdown syntax is supported for rich
text representation.
Setting this to empty String will make it not render in the generated
OpenAPI document.
Sourcepub fn value(self, value: Option<Value>) -> ExampleBuilder
pub fn value(self, value: Option<Value>) -> ExampleBuilder
Add or change embedded literal example value. Example::value and Example::external_value
are mutually exclusive.
Sourcepub fn external_value<E>(self, external_value: E) -> ExampleBuilder
pub fn external_value<E>(self, external_value: E) -> ExampleBuilder
Add or change an URI that points to a literal example value. Example::external_value
provides the capability to references an example that cannot be easily included
in JSON or YAML. Example::value and Example::external_value are mutually exclusive.
Setting this to an empty String will make the field not to render in the generated OpenAPI document.