schemars/consts.rs
1/*!
2Constants associated with JSON Schema generation.
3*/
4
5/// Known values of the `$schema` property.
6pub mod meta_schemas {
7 /// The mata-schema for [JSON Schema Draft 7](https://json-schema.org/specification-links#draft-7)
8 /// (`http://json-schema.org/draft-07/schema#`).
9 pub const DRAFT07: &str = "http://json-schema.org/draft-07/schema#";
10
11 /// The mata-schema for [JSON Schema 2019-09](https://json-schema.org/specification-links#draft-2019-09-(formerly-known-as-draft-8))
12 /// (`https://json-schema.org/draft/2019-09/schema`).
13 pub const DRAFT2019_09: &str = "https://json-schema.org/draft/2019-09/schema";
14
15 /// The mata-schema for [JSON Schema 2020-12](https://json-schema.org/specification-links#2020-12)
16 /// (`https://json-schema.org/draft/2020-12/schema`).
17 pub const DRAFT2020_12: &str = "https://json-schema.org/draft/2020-12/schema";
18
19 /// The mata-schema for [OpenAPI 3.0 schemas](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#schema)
20 /// (`https://spec.openapis.org/oas/3.0/schema/2024-10-18#/definitions/Schema`).
21 ///
22 /// This should rarely be encountered in practice, as OpenAPI schemas are typically only
23 /// embedded within OpenAPI documents, so do not have a `$schema` property set.
24 pub const OPENAPI3: &str =
25 "https://spec.openapis.org/oas/3.0/schema/2024-10-18#/definitions/Schema";
26}