Václav Kubernát | 7310938 | 2018-09-14 19:52:03 +0200 | [diff] [blame] | 1 | module example-schema { |
2 | prefix aha; | ||||
3 | namespace "http://example.com"; | ||||
4 | |||||
Václav Kubernát | 134d78f | 2019-09-03 16:42:29 +0200 | [diff] [blame] | 5 | 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át | 7310938 | 2018-09-14 19:52:03 +0200 | [diff] [blame] | 30 | type int32; |
31 | } | ||||
32 | |||||
Václav Kubernát | 134d78f | 2019-09-03 16:42:29 +0200 | [diff] [blame] | 33 | leaf leafInt64 { |
34 | type int64; | ||||
35 | } | ||||
36 | |||||
Václav Kubernát | 7310938 | 2018-09-14 19:52:03 +0200 | [diff] [blame] | 37 | 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át | 45f4a82 | 2019-05-29 21:10:50 +0200 | [diff] [blame] | 59 | list person { |
60 | key 'name'; | ||||
61 | leaf name { | ||||
62 | type string; | ||||
63 | } | ||||
64 | } | ||||
65 | |||||
Václav Kubernát | 7d82da7 | 2019-04-11 15:16:38 +0200 | [diff] [blame] | 66 | 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át | 7310938 | 2018-09-14 19:52:03 +0200 | [diff] [blame] | 80 | } |