pub struct JsonSchema {
pub default: Option<Value>,
pub description: Option<String>,
pub enum_: Option<Vec<Value>>,
pub format: Option<String>,
pub items: Option<Option<Box<JsonSchema>>>,
pub jdbc_type: Option<String>,
pub properties: Option<HashMap<String, JsonSchema>>,
pub required: Option<Vec<String>>,
pub type_: Option<Vec<String>>,
}Expand description
JsonSchema representation of schema metadata
This type is not used in any activity, and only used as part of another schema.
Fields§
§default: Option<Value>The default value of the field or object described by this schema.
description: Option<String>A description of this schema.
enum_: Option<Vec<Value>>Possible values for an enumeration. This works in conjunction with type to represent types with a fixed set of legal values
format: Option<String>Format of the value as per https://json-schema.org/understanding-json-schema/reference/string.html#format
items: Option<Option<Box<JsonSchema>>>Schema that applies to array values, applicable only if this is of type array.
jdbc_type: Option<String>JDBC datatype of the field.
properties: Option<HashMap<String, JsonSchema>>The child schemas, applicable only if this is of type object. The key is the name of the property and the value is the json schema that describes that property
required: Option<Vec<String>>Whether this property is required.
type_: Option<Vec<String>>JSON Schema Validation: A Vocabulary for Structural Validation of JSON
Trait Implementations§
Source§impl Clone for JsonSchema
impl Clone for JsonSchema
Source§fn clone(&self) -> JsonSchema
fn clone(&self) -> JsonSchema
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for JsonSchema
impl Debug for JsonSchema
Source§impl Default for JsonSchema
impl Default for JsonSchema
Source§fn default() -> JsonSchema
fn default() -> JsonSchema
Source§impl<'de> Deserialize<'de> for JsonSchema
impl<'de> Deserialize<'de> for JsonSchema
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for JsonSchema
impl Serialize for JsonSchema
impl Part for JsonSchema
Auto Trait Implementations§
impl Freeze for JsonSchema
impl RefUnwindSafe for JsonSchema
impl Send for JsonSchema
impl Sync for JsonSchema
impl Unpin for JsonSchema
impl UnwindSafe for JsonSchema
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more