Skip to main content

greentic_types/
schema_registry.rs

1//! Registry of supported canonical CBOR schemas.
2
3/// Schema definition entry.
4#[derive(Clone, Copy, Debug, PartialEq, Eq)]
5pub struct SchemaDef {
6    /// Schema identifier.
7    pub id: &'static str,
8    /// Schema version.
9    pub version: u32,
10    /// Schema kind.
11    pub kind: &'static str,
12}
13
14/// List of canonical schemas supported by this crate.
15///
16/// Add new schema entries in semver order and keep identifiers stable.
17pub const SCHEMAS: &[SchemaDef] = &[
18    SchemaDef {
19        id: "greentic.pack.describe@0.6.0",
20        version: 6,
21        kind: "pack",
22    },
23    SchemaDef {
24        id: "greentic.pack.qa@0.6.0",
25        version: 6,
26        kind: "pack",
27    },
28    SchemaDef {
29        id: "greentic.pack.validation@0.6.0",
30        version: 6,
31        kind: "pack",
32    },
33    SchemaDef {
34        id: "greentic.component.describe@0.6.0",
35        version: 6,
36        kind: "component",
37    },
38    SchemaDef {
39        id: "greentic.component.schema@0.6.0",
40        version: 6,
41        kind: "component",
42    },
43    SchemaDef {
44        id: "greentic.component.info@0.6.0",
45        version: 6,
46        kind: "component",
47    },
48    SchemaDef {
49        id: "greentic.component.qa@0.6.0",
50        version: 6,
51        kind: "component",
52    },
53    SchemaDef {
54        id: "greentic.component.config@0.6.0",
55        version: 6,
56        kind: "component",
57    },
58];