blob: 2248c287aa4717bb93bd2c5e891f1967441b35d6 [file] [log] [blame]
Václav Kubernát73109382018-09-14 19:52:03 +02001module example-schema {
2 prefix aha;
3 namespace "http://example.com";
4
Václav Kubernát134d78f2019-09-03 16:42:29 +02005 leaf leafUInt8 {
6 type uint8;
7 }
8
9 leaf leafUInt16 {
10 type uint16;
11 }
12
13 leaf leafUInt32 {
14 type uint32;
15 }
16
17 leaf leafUInt64 {
18 type uint64;
19 }
20
21 leaf leafInt8 {
22 type int8;
23 }
24
25 leaf leafInt16 {
26 type int16;
27 }
28
29 leaf leafInt32 {
Václav Kubernát73109382018-09-14 19:52:03 +020030 type int32;
31 }
32
Václav Kubernát134d78f2019-09-03 16:42:29 +020033 leaf leafInt64 {
34 type int64;
35 }
36
Václav Kubernát73109382018-09-14 19:52:03 +020037 leaf leafString {
38 type string;
39 }
40
41 leaf leafEnum {
42 type enumeration {
43 enum lol;
44 enum data;
45 enum coze;
46 }
47 }
48
49 leaf leafDecimal {
50 type decimal64 {
51 fraction-digits 9;
52 }
53 }
54
55 container pContainer {
56 presence true;
57 }
58
Václav Kubernát45f4a822019-05-29 21:10:50 +020059 list person {
60 key 'name';
61 leaf name {
62 type string;
63 }
64 }
65
Václav Kubernát7d82da72019-04-11 15:16:38 +020066 grouping upAndDown {
67 leaf up {
68 type boolean;
69 }
70 leaf down {
71 type boolean;
72 }
73 }
74
75 uses upAndDown;
76
77 container lol {
78 uses upAndDown;
79 }
Václav Kubernát73109382018-09-14 19:52:03 +020080}