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: Into<String>>(self, summary: S) -> Self
pub fn summary<S: Into<String>>(self, summary: S) -> Self
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: Into<String>>(self, description: D) -> Self
pub fn description<D: Into<String>>(self, description: D) -> Self
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>) -> Self
pub fn value(self, value: Option<Value>) -> Self
Add or change embedded literal example value. Example::value and Example::external_value
are mutually exclusive.
Sourcepub fn external_value<E: Into<String>>(self, external_value: E) -> Self
pub fn external_value<E: Into<String>>(self, external_value: E) -> Self
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.