rschema_core/
draft.rs

1use serde::Serialize;
2
3/// Meta-schema versions. [Read more](https://json-schema.org/understanding-json-schema/reference/schema.html#schema)
4/// 
5#[derive(Debug, Serialize)]
6pub enum Draft {
7    /// Add `"$schema": "http://json-schema.org/draft-04/schema#"`.
8    /// 
9    #[serde(rename = "http://json-schema.org/draft-04/schema#")]
10    Draft4,
11
12    /// Add `"$schema": "http://json-schema.org/draft-06/schema#"`.
13    /// 
14    #[serde(rename = "http://json-schema.org/draft-06/schema#")]
15    Draft6,
16
17    /// Add `"$schema": "http://json-schema.org/draft-07/schema#"`.
18    /// 
19    #[serde(rename = "http://json-schema.org/draft-07/schema#")]
20    Draft7,
21
22    /// Add `"$schema": "https://json-schema.org/draft/2019-09/schema"`.
23    /// 
24    #[serde(rename = "https://json-schema.org/draft/2019-09/schema")]
25    Draft201909,
26
27    /// Add `"$schema": "https://json-schema.org/draft/2020-12/schema"`.
28    /// 
29    #[serde(rename = "https://json-schema.org/draft/2020-12/schema")]
30    Draft202012,
31}