RIC-769: Committing individual files rather than tar archive
[ric-plt/appmgr.git] / xapp_orchestrater / dev / docs / xapp_onboarder / guide / embedded-schema.json
1 {
2         "$schema": "http://json-schema.org/draft-07/schema#",
3         "$id": "http://o-ran-sc.org/xapp_root.json",
4         "type": "object",
5         "title": "The xApp Root Schema",
6         "properties": {
7                 "xapp_name": {
8                         "$id": "#/properties/xapp_name",
9                         "type": "string",
10                         "title": "The xApp Name",
11                         "default": "xapp",
12                         "examples": [
13                                 "example_xapp"
14                         ]
15                 },
16                 "version": {
17                         "$id": "#/properties/version",
18                         "type": "string",
19                         "title": "The xApp version",
20                         "default": "1.0.0",
21                         "examples": [
22                                 "1.0.0"
23                         ],
24                         "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"
25                 },
26                 "containers": {
27                         "$id": "#/properties/containers",
28                         "type": "array",
29                         "title": "The Container Schema",
30                         "items": {
31                                 "$id": "#/properties/containers/items",
32                                 "type": "object",
33                                 "title": "The Container Items Schema",
34                                 "required": [
35                                         "name",
36                                         "image"
37                                 ],
38                                 "properties": {
39                                         "name": {
40                                                 "$id": "#/properties/containers/items/properties/name",
41                                                 "type": "string",
42                                                 "title": "The xApp Container Name",
43                                                 "default": "xapp",
44                                                 "examples": [
45                                                         "xapp"
46                                                 ]
47                                         },
48                                         "image": {
49                                                 "$id": "#/properties/containers/items/properties/image",
50                                                 "type": "object",
51                                                 "title": "The Container Image",
52                                                 "required": [
53                                                         "registry",
54                                                         "name",
55                                                         "tag"
56                                                 ],
57                                                 "properties": {
58                                                         "registry": {
59                                                                 "$id": "#/properties/containers/items/properties/image/properties/registry",
60                                                                 "type": "string",
61                                                                 "title": "The xApp Image Registry",
62                                                                 "default": "nexus3.o-ran-sc.org:10002",
63                                                                 "examples": [
64                                                                         "nexus3.o-ran-sc.org:10002"
65                                                                 ],
66                                                                 "pattern": "^[A-Za-z0-9\\.-]{1,}\\.[A-Za-z]{1,}(?:\\:\\d+)?$"
67                                                         },
68                                                         "name": {
69                                                                 "$id": "#/properties/containers/items/properties/image/properties/name",
70                                                                 "type": "string",
71                                                                 "title": "The xApp Image Name",
72                                                                 "default": "xapp",
73                                                                 "examples": [
74                                                                         "xapp"
75                                                                 ]
76                                                         },
77                                                         "tag": {
78                                                                 "$id": "#/properties/containers/items/properties/image/properties/tag",
79                                                                 "type": "string",
80                                                                 "title": "The xApp Image Tag",
81                                                                 "default": "latest",
82                                                                 "examples": [
83                                                                         "latest"
84                                                                 ]
85                                                         }
86                                                 }
87                                         },
88                                         "command": {
89                                                 "$id": "#/properties/containers/items/properties/command",
90                                                 "type": "string",
91                                                 "title": "Command To Run The xApp Container",
92                                                 "default": "command",
93                                                 "examples": [
94                                                         "command"
95                                                 ]
96                                         }
97                                 }
98                         }
99                 },
100         "livenessProbe": {
101                 "$id": "#/properties/livenessprobe",
102             "type": "object",
103                         "title": "The Liveness Probe Definition",
104             "properties": {
105                 "exec": {
106                                         "$id": "#/properties/livenessprobe/exec",
107                     "type": "object",
108                                         "title": "Script of Liveness Probe",
109                     "properties": {
110                          "command": {
111                                                          "$id": "#/properties/livenessprobe/exec/command",
112                              "type": "array",
113                              "items": [
114                                  {
115                                                                         "$id": "#/properties/livenessprobe/exec/command/item",
116                                                                         "type": "string",
117                                                                         "title": "The Command Item",
118                                                                         "default": "/bin/sh",
119                                                                         "examples": [
120                                                                                 "/bin/sh"
121                                                                         ]
122                                  }
123                              ]
124                          }
125                     },
126                     "required": [
127                         "command"
128                     ]
129                 },
130                 "httpGet": {
131                                         "$id": "#/properties/livenessprobe/httpget",
132                     "type": "object",
133                                         "title": "Http of Liveness Probe",
134                     "properties": {
135                          "path": {
136                                                         "$id": "#/properties/livenessprobe/httpget/path",
137                                                         "type": "string",
138                                                         "title": "The Path of Http Liveness Probe",
139                                                         "default": "/health",
140                                                         "examples": [
141                                                                 "/health"
142                                                         ]
143                          },
144                                                  "port": {
145                                                         "$id": "#/properties/livenessprobe/httpget/port",
146                                                         "type": "integer",
147                                                         "title": "The Port of Http Liveness Probe",
148                                                         "default": 80,
149                                                         "examples": [
150                                                                 80
151                                                         ]
152                          }
153                     },
154                     "required": [
155                         "path",
156                                         "port"
157                     ]
158                 },
159                 "initialDelaySeconds": {
160                     "$id": "#/properties/livenessprobe/initialdelayseconds",
161                                         "type": "integer",
162                                         "title": "Initial Delay of Liveness Probe",
163                                         "default": 5,
164                                         "examples": [
165                                                 5
166                                         ]
167                 },
168                 "periodSeconds": {
169                     "$id": "#/properties/livenessprobe/periodseconds",
170                                         "type": "integer",
171                                         "title": "Period of Liveness Probe",
172                                         "default": 15,
173                                         "examples": [
174                                                 15
175                                         ]
176                 }
177             },
178                     "oneOf": [
179                       { 
180                                   "$id": "#/properties/livenessprobe/oneof/exec",
181                                   "required": ["exec", "initialDelaySeconds", "periodSeconds"]
182                           },
183                       { 
184                                   "$id": "#/properties/livenessprobe/oneof/httpget",
185                                   "required": ["httpGet", "initialDelaySeconds", "periodSeconds"]
186                           }
187                     ]
188         },
189         "readinessProbe": {
190                 "$id": "#/properties/readinessprobe",
191             "type": "object",
192                         "title": "The Readiness Probe Definition",
193             "properties": {
194                 "exec": {
195                                         "$id": "#/properties/readinessprobe/exec",
196                     "type": "object",
197                                         "title": "Script of Readiness Probe",
198                     "properties": {
199                          "command": {
200                                                          "$id": "#/properties/readinessprobe/exec/command",
201                              "type": "array",
202                              "items": [
203                                  {
204                                      "type": "string"
205                                  }
206                              ]
207                          }
208                     },
209                     "required": [
210                         "command"
211                     ]
212                 },
213                 "httpGet": {
214                                         "$id": "#/properties/readinessprobe/httpget",
215                     "type": "object",
216                                         "title": "Http of Readiness Probe",
217                     "properties": {
218                          "path": {
219                                                         "$id": "#/properties/readinessprobe/httpget/path",
220                                                         "type": "string",
221                                                         "title": "The Path of Http Readiness Probe",
222                                                         "default": "/health",
223                                                         "examples": [
224                                                                 "/health"
225                                                         ]
226                          },
227                                                  "port": {
228                                                         "$id": "#/properties/readinessprobe/httpget/port",
229                                                         "type": "integer",
230                                                         "title": "The Port of Http Readiness Probe",
231                                                         "default": 80,
232                                                         "examples": [
233                                                                 80
234                                                         ]
235                          }
236                     },
237                     "required": [
238                         "path",
239                                         "port"
240                     ]
241                 },
242                 "initialDelaySeconds": {
243                     "$id": "#/properties/readinessprobe/initialdelayseconds",
244                                         "type": "integer",
245                                         "title": "Initial Delay of Readiness Probe",
246                                         "default": 5,
247                                         "examples": [
248                                                 5
249                                         ]
250                 },
251                 "periodSeconds": {
252                     "$id": "#/properties/readinessprobe/periodseconds",
253                                         "type": "integer",
254                                         "title": "Period of Readiness Probe",
255                                         "default": 15,
256                                         "examples": [
257                                                 15
258                                         ]
259                 }
260             },
261                     "oneOf": [
262                       { 
263                                   "$id": "#/properties/readinessprobe/oneof/exec",
264                                   "required": ["exec", "initialDelaySeconds", "periodSeconds"]
265                           },
266                       { 
267                                   "$id": "#/properties/readinessprobe/oneof/httpget",
268                                   "required": ["httpGet", "initialDelaySeconds", "periodSeconds"]
269                           }
270                     ]
271         },      
272             "messaging": {
273                         "type": "object",
274                         "$id": "#/properties/messaging",
275                         "title": "The Messaging Schema",
276                         "properties": {
277                                 "ports": {
278                                 "$id": "#/properties/messaging/ports",
279                                         "type": "array",
280                                         "title": "The Ports for Messaging",
281                                         "items":{
282                                                 "$id": "#/properties/messaging/ports/items",
283                                                 "type": "object",
284                                                 "title": "The Item of Port",
285                                                 "required": ["name", "container", "port"],              
286                                             "dependencies": {
287                                               "txMessages": ["rxMessages", "policies"],
288                                                   "rxMessages": ["txMessages", "policies"],
289                                                   "policies": ["rxMessages", "txMessages"]
290                                             },
291                                                 "properties": {
292                                                         "name": {
293                                                                 "$id": "#/properties/messaging/ports/items/name",
294                                                                 "type": "string",
295                                                                 "title": "The Name of the Port",
296                                                                 "default": "App",
297                                                                 "examples": [
298                                                                         "App"
299                                                                 ]
300                                                         },
301                                                         "container": {
302                                                                 "$id": "#/properties/messaging/ports/items/container",
303                                                                 "type": "string",
304                                                                 "title": "The Container of the Port",
305                                                                 "default": "xapp",
306                                                                 "examples": [
307                                                                         "xapp"
308                                                                 ]
309                                                         },
310                                                         "port": {
311                                                                 "$id": "#/properties/messaging/ports/items/port",
312                                                                 "type": "integer",
313                                                                 "title": "The Port Number",
314                                                                 "default": 8080,
315                                                                 "examples": [
316                                                                         8080
317                                                                 ]
318                                                         },
319                                                         "description": {
320                                                                 "$id": "#/properties/messaging/ports/items/description",
321                                                                 "type": "string",
322                                                                 "title": "The description for the port",
323                                                                 "default": "port description",
324                                                                 "examples": [
325                                                                         "port description"
326                                                                 ]
327                                                         },
328                                         "txMessages": {
329                                                                 "$id": "#/properties/messaging/ports/items/txmessages",
330                                             "type": "array",
331                                                                 "title": "The txMessage Types",
332                                             "items":{
333                                                                         "$id": "#/properties/messaging/ports/items//txmessages/item",
334                                                                         "type": "string",
335                                                                         "title": "The txMessage Types Item",
336                                                                         "default": "RIC_SUB",
337                                                                         "examples": [
338                                                                                 "RIC_SUB"
339                                                                         ]
340                                                                 }
341                                         },
342                                         "rxMessages": {
343                                                                 "$id": "#/properties/messaging/ports/items/rxmessages",
344                                             "type": "array",
345                                                                 "title": "The rxMessage Types",
346                                             "items":{
347                                                                         "$id": "#/properties/messaging/ports/items/rxmessages/item",
348                                                                         "type": "string",
349                                                                         "title": "The rxMessage Types Item",
350                                                                         "default": "RIC_SUB",
351                                                                         "examples": [
352                                                                                 "RIC_SUB"
353                                                                         ]
354                                                                 }
355                                         },
356                                         "policies": {
357                                                                 "$id": "#/properties/messaging/ports/items/policies",
358                                             "type": "array",
359                                                                 "title": "The Policies Types",
360                                             "items":{
361                                                                         "$id": "#/properties/messaging/ports/items/policies/item",
362                                                                         "type": "integer",
363                                                                         "title": "The Policy Types Item",
364                                                                         "default": 1,
365                                                                         "examples": [
366                                                                                 1
367                                                                         ]
368                                                                 }
369                                         }
370                                                 }
371                                         }
372                                 }
373                         },
374             "required": [
375                 "ports"
376             ]
377                                 
378                 },
379                 "metrics": {
380                         "type": "array",
381                         "$id": "#/properties/metrics",
382                         "title": "The Metrics Schema",
383                         "items": {
384                                 "$id": "#/properties/metrics/items",
385                                 "type": "object",
386                                 "title": "The Metrics Items Schema",
387                                 "required": [
388                                         "objectName",
389                                         "objectInstance",
390                                         "name",
391                                         "type",
392                                         "description"
393                                 ],
394                                 "properties": {
395                                         "objectName": {
396                                                 "$id": "#/properties/metrics/items/objectname",
397                                                 "type": "string",
398                                                 "title": "The Object Name"
399                                         },
400                                         "objectInstance": {
401                                                 "$id": "#/properties/metrics/items/objectinstance",
402                                                 "type": "string",
403                                                 "title": "The Object Instance"
404                                         },
405                                         "name": {
406                                                 "$id": "#/properties/metrics/items/name",
407                                                 "type": "string",
408                                                 "title": "The Object Name"
409                                         },
410                                         "type": {
411                                                 "$id": "#/properties/metrics/items/type",
412                                                 "type": "string",
413                                                 "title": "The Object Type"
414                                         },
415                                         "description": {
416                                                 "$id": "#/properties/metrics/items/description",
417                                                 "type": "string",
418                                                 "title": "The Object Description"
419                                         }
420                                 }
421                         }
422                 },
423                 "controls": {
424                         "required": [
425                                 "__empty_control_section__"
426                         ]
427                 }
428                 
429         }
430 }