pub struct JsonSchema {Show 22 fields
pub ref_: Option<String>,
pub additional_properties: Option<Option<Box<JsonSchema>>>,
pub annotations: Option<JsonSchemaAnnotations>,
pub default: Option<String>,
pub deprecated: Option<bool>,
pub description: Option<String>,
pub enum_: Option<Vec<String>>,
pub enum_deprecated: Option<Vec<bool>>,
pub enum_descriptions: Option<Vec<String>>,
pub format: Option<String>,
pub id: Option<String>,
pub items: Option<Option<Box<JsonSchema>>>,
pub location: Option<String>,
pub maximum: Option<String>,
pub minimum: Option<String>,
pub pattern: Option<String>,
pub properties: Option<HashMap<String, JsonSchema>>,
pub read_only: Option<bool>,
pub repeated: Option<bool>,
pub required: Option<bool>,
pub type_: Option<String>,
pub variant: Option<JsonSchemaVariant>,
}Expand description
There is no detailed description.
This type is not used in any activity, and only used as part of another schema.
Fields§
§ref_: Option<String>A reference to another schema. The value of this property is the “id” of another schema.
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.
annotations: Option<JsonSchemaAnnotations>Additional information about this property.
default: Option<String>The default value of this property (if one exists).
deprecated: Option<bool>Whether the parameter is deprecated.
description: Option<String>A description of this object.
enum_: Option<Vec<String>>Values this parameter may take (if it is an enum).
enum_deprecated: Option<Vec<bool>>The deprecation status for the enums. Each position maps to the corresponding value in the “enum” array.
enum_descriptions: Option<Vec<String>>The descriptions for the enums. Each position maps to the corresponding value in the “enum” array.
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
id: Option<String>Unique identifier for this schema.
items: Option<Option<Box<JsonSchema>>>If this is a schema for an array, this property is the schema for each element in the array.
location: Option<String>Whether this parameter goes in the query or the path for REST requests.
maximum: Option<String>The maximum value of this parameter.
minimum: Option<String>The minimum value of this parameter.
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
properties: Option<HashMap<String, JsonSchema>>If this is a schema for an object, list the schema for each property of this object.
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.
repeated: Option<bool>Whether this parameter may appear multiple times.
required: Option<bool>Whether the parameter is required.
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
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.
Trait Implementations§
Source§impl Clone for JsonSchema
impl Clone for JsonSchema
Source§fn clone(&self) -> JsonSchema
fn clone(&self) -> JsonSchema
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more