pub struct JsonSchema {
Show 20 fields pub description: Option<String>, pub format: Option<String>, pub enum_: Option<Vec<String>>, pub variant: Option<JsonSchemaVariant>, pub enum_descriptions: Option<Vec<String>>, pub read_only: Option<bool>, pub minimum: Option<String>, pub repeated: Option<bool>, pub id: Option<String>, pub ref_: Option<String>, pub default: Option<String>, pub items: Option<Option<Box<JsonSchema>>>, pub required: Option<bool>, pub maximum: Option<String>, pub properties: Option<HashMap<String, JsonSchema>>, pub location: Option<String>, pub pattern: Option<String>, pub additional_properties: Option<Option<Box<JsonSchema>>>, pub type_: Option<String>, pub annotations: Option<JsonSchemaAnnotations>,
}
Expand description

There is no detailed description.

This type is not used in any activity, and only used as part of another schema.

Fields§

§description: Option<String>

A description of this object.

§format: Option<String>

An additional regular expression or key that helps constrain the value. For more details see: http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.23

§enum_: Option<Vec<String>>

Values this parameter may take (if it is an enum).

§variant: Option<JsonSchemaVariant>

In a variant data type, the value of one property is used to determine how to interpret the entire entity. Its value must exist in a map of descriminant values to schema names.

§enum_descriptions: Option<Vec<String>>

The descriptions for the enums. Each position maps to the corresponding value in the “enum” array.

§read_only: Option<bool>

The value is read-only, generated by the service. The value cannot be modified by the client. If the value is included in a POST, PUT, or PATCH request, it is ignored by the service.

§minimum: Option<String>

The minimum value of this parameter.

§repeated: Option<bool>

Whether this parameter may appear multiple times.

§id: Option<String>

Unique identifier for this schema.

§ref_: Option<String>

A reference to another schema. The value of this property is the “id” of another schema.

§default: Option<String>

The default value of this property (if one exists).

§items: Option<Option<Box<JsonSchema>>>

If this is a schema for an array, this property is the schema for each element in the array.

§required: Option<bool>

Whether the parameter is required.

§maximum: Option<String>

The maximum value of this parameter.

§properties: Option<HashMap<String, JsonSchema>>

If this is a schema for an object, list the schema for each property of this object.

§location: Option<String>

Whether this parameter goes in the query or the path for REST requests.

§pattern: Option<String>

The regular expression this parameter must conform to. Uses Java 6 regex format: http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html

§additional_properties: Option<Option<Box<JsonSchema>>>

If this is a schema for an object, this property is the schema for any additional properties with dynamic keys on this object.

§type_: Option<String>

The value type for this schema. A list of values can be found here: http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1

§annotations: Option<JsonSchemaAnnotations>

Additional information about this property.

Trait Implementations§

source§

impl Clone for JsonSchema

source§

fn clone(&self) -> JsonSchema

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for JsonSchema

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for JsonSchema

source§

fn default() -> JsonSchema

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for JsonSchema

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for JsonSchema

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Part for JsonSchema

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Typeable for Twhere T: Any,

§

fn get_type(&self) -> TypeId

Get the TypeId of this object.
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,