Struct openrpc_types::Example
source · pub struct Example {
pub name: Option<String>,
pub summary: Option<String>,
pub description: Option<String>,
pub value: Option<Value>,
pub external_value: Option<String>,
pub extensions: SpecificationExtensions,
}Expand description
The Example object is an object that defines an example that is intended to match the schema of a given Content Descriptor.
In all cases, the example value is expected to be compatible with the type schema of its associated value. Tooling implementations MAY choose to validate compatibility automatically, and reject the example value(s) if incompatible.
Fields§
§name: Option<String>Cannonical name of the example.
summary: Option<String>Short description for the example.
description: Option<String>A verbose explanation of the example. GitHub Flavored Markdown syntax MAY be used for rich text representation.
value: Option<Value>Embedded literal example. The value field and externalValue field are mutually exclusive. To represent examples of media types that cannot naturally represented in JSON, use a string value to contain the example, escaping where necessary.
external_value: Option<String>A URL that points to the literal example. This provides the capability to reference examples that cannot easily be included in JSON documents. The value field and externalValue field are mutually exclusive.
extensions: SpecificationExtensions