Update APEX example to use JSON Schema plugin
[policy/apex-pdp.git] / examples / examples-grpc / src / main / resources / schemas / CDSCreateSubscriptionPayloadType.json
1 {
2   "$schema": "http://json-schema.org/draft-07/schema#",
3   "type": "object",
4   "required": [
5     "create-subscription-request"
6   ],
7   "properties": {
8     "create-subscription-request": {
9       "type": "object",
10       "required": [
11         "create-subscription-properties"
12       ],
13       "properties": {
14         "create-subscription-properties": {
15           "type": "object",
16           "required": [
17             "nfName",
18             "administrativeState",
19             "subscriptionName",
20             "measurementGroups",
21             "fileBasedGP",
22             "fileLocation"
23           ],
24           "properties": {
25             "nfName": {
26               "type": "string",
27               "default": "",
28               "examples": [
29                 "pnf300"
30               ],
31               "pattern": "^.*$"
32             },
33             "administrativeState": {
34               "type": "string",
35               "default": "",
36               "examples": [
37                 "UNLOCKED"
38               ],
39               "pattern": "^.*$"
40             },
41             "subscriptionName": {
42               "type": "string",
43               "default": "",
44               "examples": [
45                 "testPolicyB"
46               ],
47               "pattern": "^.*$"
48             },
49             "measurementGroups": {
50               "type": "array",
51               "default": [],
52               "items": {
53                 "type": "object",
54                 "required": [
55                   "measurementGroup"
56                 ],
57                 "properties": {
58                   "measurementGroup": {
59                     "type": "object",
60                     "required": [
61                       "measurementTypes",
62                       "managedObjectDNsBasic"
63                     ],
64                     "properties": {
65                       "measurementTypes": {
66                         "type": "array",
67                         "default": [],
68                         "items": {
69                           "type": "object",
70                           "required": [
71                             "measurementType"
72                           ],
73                           "properties": {
74                             "measurementType": {
75                               "type": "string",
76                               "default": "",
77                               "examples": [
78                                 "countera"
79                               ],
80                               "pattern": "^.*$"
81                             }
82                           }
83                         }
84                       },
85                       "managedObjectDNsBasic": {
86                         "type": "array",
87                         "default": [],
88                         "items": {
89                           "$id": "#root/create-subscription-request/create-subscription-properties/measurementGroups/items/measurementGroup/managedObjectDNsBasic/items",
90                           "title": "Items",
91                           "type": "object",
92                           "required": [
93                             "DN"
94                           ],
95                           "properties": {
96                             "DN": {
97                               "type": "string",
98                               "default": "",
99                               "examples": [
100                                 "dna"
101                               ],
102                               "pattern": "^.*$"
103                             }
104                           }
105                         }
106                       }
107                     }
108                   }
109                 }
110               }
111             },
112             "fileBasedGP": {
113               "type": "string",
114               "default": "",
115               "examples": [
116                 "15.0"
117               ],
118               "pattern": "^.*$"
119             },
120             "fileLocation": {
121               "type": "string",
122               "default": "",
123               "examples": [
124                 "/pm/pm.xml"
125               ],
126               "pattern": "^.*$"
127             }
128           }
129         }
130       }
131     }
132   }
133 }