pub struct SchemaConfig {
pub title: Option<String>,
pub description: Option<String>,
pub schema_id: Option<String>,
pub strict: bool,
pub include_examples: bool,
pub include_metadata: bool,
}Expand description
Configuration for JSON Schema generation
Fields§
§title: Option<String>Schema title (optional)
description: Option<String>Schema description (optional)
schema_id: Option<String>Schema $id URI (optional)
strict: boolStrict mode: disallow additional properties (default: false)
include_examples: boolInclude example values in schema (default: false)
include_metadata: boolInclude metadata fields like title, description, $id (default: true)
Implementations§
Source§impl SchemaConfig
impl SchemaConfig
Sourcepub fn builder() -> SchemaConfigBuilder
pub fn builder() -> SchemaConfigBuilder
Create a new builder for SchemaConfig
Trait Implementations§
Source§impl Clone for SchemaConfig
impl Clone for SchemaConfig
Source§fn clone(&self) -> SchemaConfig
fn clone(&self) -> SchemaConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SchemaConfig
impl Debug for SchemaConfig
Auto Trait Implementations§
impl Freeze for SchemaConfig
impl RefUnwindSafe for SchemaConfig
impl Send for SchemaConfig
impl Sync for SchemaConfig
impl Unpin for SchemaConfig
impl UnwindSafe for SchemaConfig
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