Merge "Add integration test for extending API: Get Module Definitions"
[cps.git] / integration-test / src / test / resources / data / bookstore / bookstore.yang
1 module stores {
2     yang-version 1.1;
3     namespace "org:onap:cps:sample";
4
5     prefix book-store;
6
7     import bookstore-types {
8         prefix "types";
9         revision-date 2024-01-30;
10     }
11
12     revision "2024-01-30" {
13         description
14             "Extracted bookstore types";
15     }
16
17     revision "2020-09-15" {
18         description
19         "Sample Model";
20     }
21
22     list bookstore-address {
23         key "bookstore-name";
24         leaf bookstore-name {
25             type string;
26             description
27             "Name of bookstore. Example: My Bookstore";
28         }
29         leaf address {
30             type string;
31             description
32             "Address of store";
33         }
34         leaf postal-code {
35             type string;
36             description
37             "Postal code of store";
38         }
39     }
40
41     container bookstore {
42
43         leaf bookstore-name {
44             type string;
45         }
46
47         container webinfo {
48             leaf domain-name {
49                 type string;
50             }
51             leaf contact-email {
52                 type string;
53             }
54         }
55
56         container support-info {
57                     leaf support-office {
58                         type string;
59                     }
60                     container contact-emails {
61                         leaf email {
62                             type string;
63                         }
64                     }
65                 }
66
67         container container-without-leaves { }
68
69         container premises {
70             list addresses {
71                 key "house-number street";
72
73                 leaf house-number {
74                     type uint16;
75                 }
76                 leaf street {
77                     type string;
78                 }
79                 leaf town {
80                     type string;
81                 }
82                 leaf county {
83                     type string;
84                 }
85             }
86         }
87
88         list categories {
89
90             key "code";
91
92             leaf code {
93                 type string;
94             }
95
96             leaf name {
97                 type string;
98             }
99
100             list books {
101                 key title;
102
103                 leaf title {
104                     type string;
105                 }
106                 leaf lang {
107                     type string;
108                 }
109                 leaf-list authors {
110                     type string;
111                 }
112                 leaf-list editions {
113                     type types:year;
114                 }
115                 leaf price {
116                     type uint64;
117                 }
118             }
119         }
120     }
121 }