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 | |||||
5 | leaf leafInt { | ||||
6 | type int32; | ||||
7 | } | ||||
8 | |||||
9 | leaf leafString { | ||||
10 | type string; | ||||
11 | } | ||||
12 | |||||
13 | leaf leafEnum { | ||||
14 | type enumeration { | ||||
15 | enum lol; | ||||
16 | enum data; | ||||
17 | enum coze; | ||||
18 | } | ||||
19 | } | ||||
20 | |||||
21 | leaf leafDecimal { | ||||
22 | type decimal64 { | ||||
23 | fraction-digits 9; | ||||
24 | } | ||||
25 | } | ||||
26 | |||||
27 | container pContainer { | ||||
28 | presence true; | ||||
29 | } | ||||
30 | |||||
Václav Kubernát | 45f4a82 | 2019-05-29 21:10:50 +0200 | [diff] [blame] | 31 | list person { |
32 | key 'name'; | ||||
33 | leaf name { | ||||
34 | type string; | ||||
35 | } | ||||
36 | } | ||||
37 | |||||
Václav Kubernát | 7d82da7 | 2019-04-11 15:16:38 +0200 | [diff] [blame] | 38 | grouping upAndDown { |
39 | leaf up { | ||||
40 | type boolean; | ||||
41 | } | ||||
42 | leaf down { | ||||
43 | type boolean; | ||||
44 | } | ||||
45 | } | ||||
46 | |||||
47 | uses upAndDown; | ||||
48 | |||||
49 | container lol { | ||||
50 | uses upAndDown; | ||||
51 | } | ||||
Václav Kubernát | 7310938 | 2018-09-14 19:52:03 +0200 | [diff] [blame] | 52 | } |