jsonschema_schema/schema/vocabularies/format_annotation.rs
1/// Format-annotation vocabulary.
2///
3/// See [JSON Schema Validation §7](https://json-schema.org/draft/2020-12/json-schema-validation#section-7).
4#[derive(
5 Debug,
6 Clone,
7 Default,
8 PartialEq,
9 Eq,
10 serde::Serialize,
11 serde::Deserialize,
12 schemars::JsonSchema,
13 combine_structs::Fields,
14)]
15pub struct FormatAnnotationVocabulary {
16 /// The `format` keyword — semantic format annotation.
17 ///
18 /// Structural validation alone may be insufficient to allow an
19 /// application to correctly utilize certain values. The `"format"`
20 /// annotation keyword is defined to allow schema authors to convey
21 /// semantic information for a fixed subset of values which are
22 /// accurately described by authoritative resources, be they RFCs or
23 /// other external specifications.
24 ///
25 /// The value of this keyword is called a format attribute. It MUST
26 /// be a string.
27 ///
28 /// See [JSON Schema Validation §7](https://json-schema.org/draft/2020-12/json-schema-validation#section-7).
29 #[serde(skip_serializing_if = "Option::is_none")]
30 pub format: Option<String>,
31}