Merge "Bug 2999: Use normalized type in creation of simple JSON codecs."
[yangtools.git] / yang / yang-data-codec-gson / src / test / resources / complexjson / yang / complexjson.yang
1 module complexjson {
2     namespace "ns:complex:json";
3     prefix cj;
4
5     revision "2014-08-11" {
6     }
7
8     typedef wrapped-instance-identifier {
9         description "Wrapped instance Identifier";
10         type instance-identifier;
11     }
12
13     identity ident;
14
15     container cont1 {
16
17         anyxml lf12-any;
18         anyxml lf13-any;
19         anyxml lf14-any;
20
21         leaf lf11 {
22             type int32;
23         }
24
25         leaf-list lflst11 {
26             type string;
27         }
28
29         list lst11 {
30             key "key111 lf111";
31             leaf key111 {
32                 type string;
33             }
34             leaf lf111 {
35                 type string;
36             }
37             leaf lf112 {
38                 type wrapped-instance-identifier;
39             }
40             leaf lf113 {
41                 type string;
42             }
43         }
44
45         list lst12 {
46             leaf lf121 {
47                 type string;
48             }
49             leaf lf122 {
50                 type string;
51             }
52         }
53
54
55         choice choc11 {
56             case c11A {
57                 leaf lf13 {
58                     type string;
59                 }
60             }
61             leaf lf16 {
62                 type string;
63             }
64         }
65
66         choice choc12 {
67             case c12A {
68             }
69         }
70     }
71
72     augment "/cont1/choc12" {
73         case c12B {
74             leaf lf17 {
75                 type string;
76             }
77         }
78     }
79
80     augment "/cont1" {
81         container cont11 {
82             leaf lf111 {
83                 type string;
84             }
85         }
86     }
87
88     augment "/cont1" {
89         leaf lf12_1 {
90             type string;
91         }
92         leaf lf12_2 {
93             type string;
94         }
95     }
96
97     augment "/cont1" {
98         leaf lf12_3 {
99             type string;
100         }
101     }
102
103     augment "/cont1/choc11" {
104         case c11B {
105             leaf lf14_1  {
106                 type string;
107             }
108         }
109     }
110
111     augment "/cont1/choc11" {
112         case c11C {
113             leaf lf14_2  {
114                 type string;
115             }
116         }
117     }
118
119     augment "/cont1/choc11/c11A" {
120         leaf lf15_11  {
121             type bits {
122                 bit one;
123                 bit two;
124                 bit three;
125             }
126         }
127         leaf lf15_12  {
128             type identityref {
129                 base ident;
130             }
131         }
132
133     }
134
135     augment "/cont1/choc11/c11A" {
136         leaf lf15_21 {
137             type string;
138         }
139     }
140
141 }