pub struct Property {
pub name: String,
pub type: TypeRef,
pub required: bool,
pub title: Option<String>,
pub description: Option<String>,
pub deprecated: bool,
pub read_only: bool,
pub write_only: bool,
pub external_docs: Option<ExternalDocs>,
pub default: Option<ValueRef>,
pub examples: Vec<(String, Example)>,
pub extensions: Vec<(String, ValueRef)>,
}Fields§
§name: String§type: TypeRef§required: booltrue when the spec lists this property name in the parent
schema’s required array. Moved here from
ObjectType.required for a uniform spelling with
Parameter.required.
title: Option<String>JSON Schema title — short human label.
description: Option<String>JSON Schema / OAS description (CommonMark).
deprecated: boolJSON Schema 2020-12 deprecated.
read_only: bool§write_only: bool§external_docs: Option<ExternalDocs>Per-schema externalDocs (OAS Schema Object).
default: Option<ValueRef>JSON Schema default for the property. ValueRef indexes
into crate::Ir::values; compound defaults are pooled there.
examples: Vec<(String, Example)>OAS example / examples for this property. Named entries;
3.0 example: <literal> lands under the synthetic key
"_default".
extensions: Vec<(String, ValueRef)>x-* extensions declared on the property’s schema. Each entry
pairs a key with a ValueRef into crate::Ir::values;
compound values are pooled there.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Property
impl<'de> Deserialize<'de> for Property
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>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Property
Auto Trait Implementations§
impl Freeze for Property
impl RefUnwindSafe for Property
impl Send for Property
impl Sync for Property
impl Unpin for Property
impl UnsafeUnpin for Property
impl UnwindSafe for Property
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
Mutably borrows from an owned value. Read more