pub struct JsonSchemaBuilder(/* private fields */);Expand description
Builder for JsonSchema.
Implementations§
Source§impl JsonSchemaBuilder
impl JsonSchemaBuilder
pub fn properties(self, value: impl Into<Value>) -> Self
pub fn required(self, value: impl Into<Vec<String>>) -> Self
pub fn additional_properties(self, value: impl Into<Value>) -> Self
pub fn defs(self, value: impl Into<Value>) -> Self
pub fn definitions(self, value: impl Into<Value>) -> Self
pub fn schema_uri(self, value: impl Into<String>) -> Self
pub fn id(self, value: impl Into<String>) -> Self
pub fn reference(self, value: impl Into<String>) -> Self
pub fn anchor(self, value: impl Into<String>) -> Self
pub fn dynamic_reference(self, value: impl Into<String>) -> Self
pub fn dynamic_anchor(self, value: impl Into<String>) -> Self
pub fn comment(self, value: impl Into<String>) -> Self
pub fn title(self, value: impl Into<String>) -> Self
pub fn description(self, value: impl Into<String>) -> Self
pub fn default_value(self, value: impl Into<Value>) -> Self
pub fn examples(self, value: impl Into<Vec<Value>>) -> Self
pub fn enum_values(self, value: impl Into<Vec<Value>>) -> Self
pub fn const_value(self, value: impl Into<Value>) -> Self
pub fn all_of(self, value: impl Into<Vec<Value>>) -> Self
pub fn any_of(self, value: impl Into<Vec<Value>>) -> Self
pub fn one_of(self, value: impl Into<Vec<Value>>) -> Self
pub fn not(self, value: impl Into<Value>) -> Self
pub fn if_schema(self, value: impl Into<Value>) -> Self
pub fn then_schema(self, value: impl Into<Value>) -> Self
pub fn else_schema(self, value: impl Into<Value>) -> Self
pub fn pattern_properties(self, value: impl Into<Value>) -> Self
pub fn property_names(self, value: impl Into<Value>) -> Self
pub fn dependent_required(self, value: impl Into<Value>) -> Self
pub fn dependent_schemas(self, value: impl Into<Value>) -> Self
pub fn dependencies(self, value: impl Into<Value>) -> Self
pub fn unevaluated_properties(self, value: impl Into<Value>) -> Self
pub fn min_properties(self, value: impl Into<u64>) -> Self
pub fn max_properties(self, value: impl Into<u64>) -> Self
pub fn read_only(self, value: impl Into<bool>) -> Self
pub fn write_only(self, value: impl Into<bool>) -> Self
pub fn deprecated(self, value: impl Into<bool>) -> Self
pub fn rest(self, value: Rest) -> Self
Sourcepub fn build(self) -> JsonSchema
pub fn build(self) -> JsonSchema
Return the completed wire value.
Auto Trait Implementations§
impl Freeze for JsonSchemaBuilder
impl RefUnwindSafe for JsonSchemaBuilder
impl Send for JsonSchemaBuilder
impl Sync for JsonSchemaBuilder
impl Unpin for JsonSchemaBuilder
impl UnsafeUnpin for JsonSchemaBuilder
impl UnwindSafe for JsonSchemaBuilder
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