[BUG] Fix for Swagger UI generation
[cps.git] / docs / api / swagger / cps / openapi.yaml
1 openapi: 3.0.3
2 info:
3   contact:
4     email: onap-discuss@lists.onap.org
5     name: ONAP
6     url: https://onap.readthedocs.io
7   description: Configuration Persistence Service is a Model Driven Generic Database
8   license:
9     name: Apache 2.0
10     url: http://www.apache.org/licenses/LICENSE-2.0
11   title: ONAP Open API v3 Configuration Persistence Service
12   version: 1.0.0
13   x-planned-retirement-date: "202212"
14   x-component: Modeling
15   x-logo:
16     url: cps_logo.png
17 servers:
18 - url: /cps/api
19 security:
20 - basicAuth: []
21 tags:
22 - description: cps Admin
23   name: cps-admin
24 - description: cps Data
25   name: cps-data
26 paths:
27   /v1/dataspaces:
28     post:
29       deprecated: true
30       description: Create a new dataspace
31       operationId: createDataspace
32       parameters:
33       - description: dataspace-name
34         in: query
35         name: dataspace-name
36         required: true
37         schema:
38           example: my-dataspace
39           type: string
40       responses:
41         "201":
42           content:
43             text/plain:
44               schema:
45                 example: my-resource
46                 type: string
47           description: Created
48         "400":
49           content:
50             application/json:
51               example:
52                 status: 400
53                 message: Bad Request
54                 details: The provided request is not valid
55               schema:
56                 $ref: '#/components/schemas/ErrorMessage'
57           description: Bad Request
58         "401":
59           content:
60             application/json:
61               example:
62                 status: 401
63                 message: Unauthorized request
64                 details: This request is unauthorized
65               schema:
66                 $ref: '#/components/schemas/ErrorMessage'
67           description: Unauthorized
68         "403":
69           content:
70             application/json:
71               example:
72                 status: 403
73                 message: Request Forbidden
74                 details: This request is forbidden
75               schema:
76                 $ref: '#/components/schemas/ErrorMessage'
77           description: Forbidden
78         "409":
79           content:
80             application/json:
81               example:
82                 status: 409
83                 message: Conflicting request
84                 details: The request cannot be processed as the resource is in use.
85               schema:
86                 $ref: '#/components/schemas/ErrorMessage'
87           description: Conflict
88         "500":
89           content:
90             application/json:
91               example:
92                 status: 500
93                 message: Internal Server Error
94                 details: Internal Server Error occurred
95               schema:
96                 $ref: '#/components/schemas/ErrorMessage'
97           description: Internal Server Error
98       summary: Create a dataspace
99       tags:
100       - cps-admin
101   /{apiVersion}/dataspaces:
102     delete:
103       description: Delete a dataspace
104       operationId: deleteDataspace
105       parameters:
106       - description: apiVersion
107         in: path
108         name: apiVersion
109         required: true
110         schema:
111           default: v2
112           enum:
113           - v1
114           - v2
115           type: string
116       - description: dataspace-name
117         in: query
118         name: dataspace-name
119         required: true
120         schema:
121           example: my-dataspace
122           type: string
123       responses:
124         "204":
125           content: {}
126           description: No Content
127         "400":
128           content:
129             application/json:
130               example:
131                 status: 400
132                 message: Bad Request
133                 details: The provided request is not valid
134               schema:
135                 $ref: '#/components/schemas/ErrorMessage'
136           description: Bad Request
137         "401":
138           content:
139             application/json:
140               example:
141                 status: 401
142                 message: Unauthorized request
143                 details: This request is unauthorized
144               schema:
145                 $ref: '#/components/schemas/ErrorMessage'
146           description: Unauthorized
147         "403":
148           content:
149             application/json:
150               example:
151                 status: 403
152                 message: Request Forbidden
153                 details: This request is forbidden
154               schema:
155                 $ref: '#/components/schemas/ErrorMessage'
156           description: Forbidden
157         "409":
158           content:
159             application/json:
160               example:
161                 status: 409
162                 message: Conflicting request
163                 details: The request cannot be processed as the resource is in use.
164               schema:
165                 $ref: '#/components/schemas/ErrorMessage'
166           description: Conflict
167         "500":
168           content:
169             application/json:
170               example:
171                 status: 500
172                 message: Internal Server Error
173                 details: Internal Server Error occurred
174               schema:
175                 $ref: '#/components/schemas/ErrorMessage'
176           description: Internal Server Error
177       summary: Delete a dataspace
178       tags:
179       - cps-admin
180   /v2/dataspaces:
181     post:
182       description: Create a new dataspace
183       operationId: createDataspaceV2
184       parameters:
185       - description: dataspace-name
186         in: query
187         name: dataspace-name
188         required: true
189         schema:
190           example: my-dataspace
191           type: string
192       responses:
193         "201":
194           description: Created without response body
195         "400":
196           content:
197             application/json:
198               example:
199                 status: 400
200                 message: Bad Request
201                 details: The provided request is not valid
202               schema:
203                 $ref: '#/components/schemas/ErrorMessage'
204           description: Bad Request
205         "401":
206           content:
207             application/json:
208               example:
209                 status: 401
210                 message: Unauthorized request
211                 details: This request is unauthorized
212               schema:
213                 $ref: '#/components/schemas/ErrorMessage'
214           description: Unauthorized
215         "403":
216           content:
217             application/json:
218               example:
219                 status: 403
220                 message: Request Forbidden
221                 details: This request is forbidden
222               schema:
223                 $ref: '#/components/schemas/ErrorMessage'
224           description: Forbidden
225         "409":
226           content:
227             application/json:
228               example:
229                 status: 409
230                 message: Conflicting request
231                 details: The request cannot be processed as the resource is in use.
232               schema:
233                 $ref: '#/components/schemas/ErrorMessage'
234           description: Conflict
235         "500":
236           content:
237             application/json:
238               example:
239                 status: 500
240                 message: Internal Server Error
241                 details: Internal Server Error occurred
242               schema:
243                 $ref: '#/components/schemas/ErrorMessage'
244           description: Internal Server Error
245       summary: Create a dataspace
246       tags:
247       - cps-admin
248   /{apiVersion}/admin/dataspaces:
249     get:
250       description: Read all dataspaces
251       operationId: getAllDataspaces
252       parameters:
253       - description: apiVersion
254         in: path
255         name: apiVersion
256         required: true
257         schema:
258           default: v2
259           enum:
260           - v1
261           - v2
262           type: string
263       responses:
264         "200":
265           content:
266             application/json:
267               schema:
268                 items:
269                   $ref: '#/components/schemas/DataspaceDetails'
270                 type: array
271           description: OK
272         "400":
273           content:
274             application/json:
275               example:
276                 status: 400
277                 message: Bad Request
278                 details: The provided request is not valid
279               schema:
280                 $ref: '#/components/schemas/ErrorMessage'
281           description: Bad Request
282         "401":
283           content:
284             application/json:
285               example:
286                 status: 401
287                 message: Unauthorized request
288                 details: This request is unauthorized
289               schema:
290                 $ref: '#/components/schemas/ErrorMessage'
291           description: Unauthorized
292         "403":
293           content:
294             application/json:
295               example:
296                 status: 403
297                 message: Request Forbidden
298                 details: This request is forbidden
299               schema:
300                 $ref: '#/components/schemas/ErrorMessage'
301           description: Forbidden
302         "500":
303           content:
304             application/json:
305               example:
306                 status: 500
307                 message: Internal Server Error
308                 details: Internal Server Error occurred
309               schema:
310                 $ref: '#/components/schemas/ErrorMessage'
311           description: Internal Server Error
312       summary: Get all dataspaces
313       tags:
314       - cps-admin
315   /{apiVersion}/admin/dataspaces/{dataspace-name}:
316     get:
317       description: Read a dataspace given a dataspace name
318       operationId: getDataspace
319       parameters:
320       - description: apiVersion
321         in: path
322         name: apiVersion
323         required: true
324         schema:
325           default: v2
326           enum:
327           - v1
328           - v2
329           type: string
330       - description: dataspace-name
331         in: path
332         name: dataspace-name
333         required: true
334         schema:
335           example: my-dataspace
336           type: string
337       responses:
338         "200":
339           content:
340             application/json:
341               schema:
342                 $ref: '#/components/schemas/DataspaceDetails'
343           description: OK
344         "400":
345           content:
346             application/json:
347               example:
348                 status: 400
349                 message: Bad Request
350                 details: The provided request is not valid
351               schema:
352                 $ref: '#/components/schemas/ErrorMessage'
353           description: Bad Request
354         "401":
355           content:
356             application/json:
357               example:
358                 status: 401
359                 message: Unauthorized request
360                 details: This request is unauthorized
361               schema:
362                 $ref: '#/components/schemas/ErrorMessage'
363           description: Unauthorized
364         "403":
365           content:
366             application/json:
367               example:
368                 status: 403
369                 message: Request Forbidden
370                 details: This request is forbidden
371               schema:
372                 $ref: '#/components/schemas/ErrorMessage'
373           description: Forbidden
374         "500":
375           content:
376             application/json:
377               example:
378                 status: 500
379                 message: Internal Server Error
380                 details: Internal Server Error occurred
381               schema:
382                 $ref: '#/components/schemas/ErrorMessage'
383           description: Internal Server Error
384       summary: Get a dataspace
385       tags:
386       - cps-admin
387   /v1/dataspaces/{dataspace-name}/anchors:
388     post:
389       deprecated: true
390       description: Create a new anchor in the given dataspace
391       operationId: createAnchor
392       parameters:
393       - description: dataspace-name
394         in: path
395         name: dataspace-name
396         required: true
397         schema:
398           example: my-dataspace
399           type: string
400       - description: schema-set-name
401         in: query
402         name: schema-set-name
403         required: true
404         schema:
405           example: my-schema-set
406           type: string
407       - description: anchor-name
408         in: query
409         name: anchor-name
410         required: true
411         schema:
412           example: my-anchor
413           type: string
414       responses:
415         "201":
416           content:
417             text/plain:
418               schema:
419                 example: my-resource
420                 type: string
421           description: Created
422         "400":
423           content:
424             application/json:
425               example:
426                 status: 400
427                 message: Bad Request
428                 details: The provided request is not valid
429               schema:
430                 $ref: '#/components/schemas/ErrorMessage'
431           description: Bad Request
432         "401":
433           content:
434             application/json:
435               example:
436                 status: 401
437                 message: Unauthorized request
438                 details: This request is unauthorized
439               schema:
440                 $ref: '#/components/schemas/ErrorMessage'
441           description: Unauthorized
442         "403":
443           content:
444             application/json:
445               example:
446                 status: 403
447                 message: Request Forbidden
448                 details: This request is forbidden
449               schema:
450                 $ref: '#/components/schemas/ErrorMessage'
451           description: Forbidden
452         "409":
453           content:
454             application/json:
455               example:
456                 status: 409
457                 message: Conflicting request
458                 details: The request cannot be processed as the resource is in use.
459               schema:
460                 $ref: '#/components/schemas/ErrorMessage'
461           description: Conflict
462         "500":
463           content:
464             application/json:
465               example:
466                 status: 500
467                 message: Internal Server Error
468                 details: Internal Server Error occurred
469               schema:
470                 $ref: '#/components/schemas/ErrorMessage'
471           description: Internal Server Error
472       summary: Create an anchor
473       tags:
474       - cps-admin
475   /v2/dataspaces/{dataspace-name}/anchors:
476     post:
477       description: Create a new anchor in the given dataspace
478       operationId: createAnchorV2
479       parameters:
480       - description: dataspace-name
481         in: path
482         name: dataspace-name
483         required: true
484         schema:
485           example: my-dataspace
486           type: string
487       - description: schema-set-name
488         in: query
489         name: schema-set-name
490         required: true
491         schema:
492           example: my-schema-set
493           type: string
494       - description: anchor-name
495         in: query
496         name: anchor-name
497         required: true
498         schema:
499           example: my-anchor
500           type: string
501       responses:
502         "201":
503           description: Created without response body
504         "400":
505           content:
506             application/json:
507               example:
508                 status: 400
509                 message: Bad Request
510                 details: The provided request is not valid
511               schema:
512                 $ref: '#/components/schemas/ErrorMessage'
513           description: Bad Request
514         "401":
515           content:
516             application/json:
517               example:
518                 status: 401
519                 message: Unauthorized request
520                 details: This request is unauthorized
521               schema:
522                 $ref: '#/components/schemas/ErrorMessage'
523           description: Unauthorized
524         "403":
525           content:
526             application/json:
527               example:
528                 status: 403
529                 message: Request Forbidden
530                 details: This request is forbidden
531               schema:
532                 $ref: '#/components/schemas/ErrorMessage'
533           description: Forbidden
534         "409":
535           content:
536             application/json:
537               example:
538                 status: 409
539                 message: Conflicting request
540                 details: The request cannot be processed as the resource is in use.
541               schema:
542                 $ref: '#/components/schemas/ErrorMessage'
543           description: Conflict
544         "500":
545           content:
546             application/json:
547               example:
548                 status: 500
549                 message: Internal Server Error
550                 details: Internal Server Error occurred
551               schema:
552                 $ref: '#/components/schemas/ErrorMessage'
553           description: Internal Server Error
554       summary: Create an anchor
555       tags:
556       - cps-admin
557   /{apiVersion}/dataspaces/{dataspace-name}/anchors:
558     get:
559       description: "Read all anchors, given a dataspace"
560       operationId: getAnchors
561       parameters:
562       - description: apiVersion
563         in: path
564         name: apiVersion
565         required: true
566         schema:
567           default: v2
568           enum:
569           - v1
570           - v2
571           type: string
572       - description: dataspace-name
573         in: path
574         name: dataspace-name
575         required: true
576         schema:
577           example: my-dataspace
578           type: string
579       responses:
580         "200":
581           content:
582             application/json:
583               schema:
584                 items:
585                   $ref: '#/components/schemas/AnchorDetails'
586                 type: array
587           description: OK
588         "400":
589           content:
590             application/json:
591               example:
592                 status: 400
593                 message: Bad Request
594                 details: The provided request is not valid
595               schema:
596                 $ref: '#/components/schemas/ErrorMessage'
597           description: Bad Request
598         "401":
599           content:
600             application/json:
601               example:
602                 status: 401
603                 message: Unauthorized request
604                 details: This request is unauthorized
605               schema:
606                 $ref: '#/components/schemas/ErrorMessage'
607           description: Unauthorized
608         "403":
609           content:
610             application/json:
611               example:
612                 status: 403
613                 message: Request Forbidden
614                 details: This request is forbidden
615               schema:
616                 $ref: '#/components/schemas/ErrorMessage'
617           description: Forbidden
618         "500":
619           content:
620             application/json:
621               example:
622                 status: 500
623                 message: Internal Server Error
624                 details: Internal Server Error occurred
625               schema:
626                 $ref: '#/components/schemas/ErrorMessage'
627           description: Internal Server Error
628       summary: Get anchors
629       tags:
630       - cps-admin
631   /{apiVersion}/dataspaces/{dataspace-name}/anchors/{anchor-name}:
632     delete:
633       description: Delete an anchor given an anchor name and a dataspace
634       operationId: deleteAnchor
635       parameters:
636       - description: apiVersion
637         in: path
638         name: apiVersion
639         required: true
640         schema:
641           default: v2
642           enum:
643           - v1
644           - v2
645           type: string
646       - description: dataspace-name
647         in: path
648         name: dataspace-name
649         required: true
650         schema:
651           example: my-dataspace
652           type: string
653       - description: anchor-name
654         in: path
655         name: anchor-name
656         required: true
657         schema:
658           example: my-anchor
659           type: string
660       responses:
661         "204":
662           content: {}
663           description: No Content
664         "400":
665           content:
666             application/json:
667               example:
668                 status: 400
669                 message: Bad Request
670                 details: The provided request is not valid
671               schema:
672                 $ref: '#/components/schemas/ErrorMessage'
673           description: Bad Request
674         "401":
675           content:
676             application/json:
677               example:
678                 status: 401
679                 message: Unauthorized request
680                 details: This request is unauthorized
681               schema:
682                 $ref: '#/components/schemas/ErrorMessage'
683           description: Unauthorized
684         "403":
685           content:
686             application/json:
687               example:
688                 status: 403
689                 message: Request Forbidden
690                 details: This request is forbidden
691               schema:
692                 $ref: '#/components/schemas/ErrorMessage'
693           description: Forbidden
694         "500":
695           content:
696             application/json:
697               example:
698                 status: 500
699                 message: Internal Server Error
700                 details: Internal Server Error occurred
701               schema:
702                 $ref: '#/components/schemas/ErrorMessage'
703           description: Internal Server Error
704       summary: Delete an anchor
705       tags:
706       - cps-admin
707     get:
708       description: Read an anchor given an anchor name and a dataspace
709       operationId: getAnchor
710       parameters:
711       - description: apiVersion
712         in: path
713         name: apiVersion
714         required: true
715         schema:
716           default: v2
717           enum:
718           - v1
719           - v2
720           type: string
721       - description: dataspace-name
722         in: path
723         name: dataspace-name
724         required: true
725         schema:
726           example: my-dataspace
727           type: string
728       - description: anchor-name
729         in: path
730         name: anchor-name
731         required: true
732         schema:
733           example: my-anchor
734           type: string
735       responses:
736         "200":
737           content:
738             application/json:
739               schema:
740                 $ref: '#/components/schemas/AnchorDetails'
741           description: OK
742         "400":
743           content:
744             application/json:
745               example:
746                 status: 400
747                 message: Bad Request
748                 details: The provided request is not valid
749               schema:
750                 $ref: '#/components/schemas/ErrorMessage'
751           description: Bad Request
752         "401":
753           content:
754             application/json:
755               example:
756                 status: 401
757                 message: Unauthorized request
758                 details: This request is unauthorized
759               schema:
760                 $ref: '#/components/schemas/ErrorMessage'
761           description: Unauthorized
762         "403":
763           content:
764             application/json:
765               example:
766                 status: 403
767                 message: Request Forbidden
768                 details: This request is forbidden
769               schema:
770                 $ref: '#/components/schemas/ErrorMessage'
771           description: Forbidden
772         "500":
773           content:
774             application/json:
775               example:
776                 status: 500
777                 message: Internal Server Error
778                 details: Internal Server Error occurred
779               schema:
780                 $ref: '#/components/schemas/ErrorMessage'
781           description: Internal Server Error
782       summary: Get an anchor
783       tags:
784       - cps-admin
785   /v1/dataspaces/{dataspace-name}/schema-sets:
786     post:
787       deprecated: true
788       description: Create a new schema set in the given dataspace
789       operationId: createSchemaSet
790       parameters:
791       - description: dataspace-name
792         in: path
793         name: dataspace-name
794         required: true
795         schema:
796           example: my-dataspace
797           type: string
798       - description: schema-set-name
799         in: query
800         name: schema-set-name
801         required: true
802         schema:
803           example: my-schema-set
804           type: string
805       requestBody:
806         content:
807           multipart/form-data:
808             schema:
809               $ref: '#/components/schemas/MultipartFile'
810         required: true
811       responses:
812         "201":
813           content:
814             text/plain:
815               schema:
816                 example: my-resource
817                 type: string
818           description: Created
819         "400":
820           content:
821             application/json:
822               example:
823                 status: 400
824                 message: Bad Request
825                 details: The provided request is not valid
826               schema:
827                 $ref: '#/components/schemas/ErrorMessage'
828           description: Bad Request
829         "401":
830           content:
831             application/json:
832               example:
833                 status: 401
834                 message: Unauthorized request
835                 details: This request is unauthorized
836               schema:
837                 $ref: '#/components/schemas/ErrorMessage'
838           description: Unauthorized
839         "403":
840           content:
841             application/json:
842               example:
843                 status: 403
844                 message: Request Forbidden
845                 details: This request is forbidden
846               schema:
847                 $ref: '#/components/schemas/ErrorMessage'
848           description: Forbidden
849         "409":
850           content:
851             application/json:
852               example:
853                 status: 409
854                 message: Conflicting request
855                 details: The request cannot be processed as the resource is in use.
856               schema:
857                 $ref: '#/components/schemas/ErrorMessage'
858           description: Conflict
859         "500":
860           content:
861             application/json:
862               example:
863                 status: 500
864                 message: Internal Server Error
865                 details: Internal Server Error occurred
866               schema:
867                 $ref: '#/components/schemas/ErrorMessage'
868           description: Internal Server Error
869       summary: Create a schema set
870       tags:
871       - cps-admin
872   /v2/dataspaces/{dataspace-name}/schema-sets:
873     post:
874       description: Create a new schema set in the given dataspace
875       operationId: createSchemaSetV2
876       parameters:
877       - description: dataspace-name
878         in: path
879         name: dataspace-name
880         required: true
881         schema:
882           example: my-dataspace
883           type: string
884       - description: schema-set-name
885         in: query
886         name: schema-set-name
887         required: true
888         schema:
889           example: my-schema-set
890           type: string
891       requestBody:
892         content:
893           multipart/form-data:
894             schema:
895               $ref: '#/components/schemas/MultipartFile'
896         required: true
897       responses:
898         "201":
899           description: Created without response body
900         "400":
901           content:
902             application/json:
903               example:
904                 status: 400
905                 message: Bad Request
906                 details: The provided request is not valid
907               schema:
908                 $ref: '#/components/schemas/ErrorMessage'
909           description: Bad Request
910         "401":
911           content:
912             application/json:
913               example:
914                 status: 401
915                 message: Unauthorized request
916                 details: This request is unauthorized
917               schema:
918                 $ref: '#/components/schemas/ErrorMessage'
919           description: Unauthorized
920         "403":
921           content:
922             application/json:
923               example:
924                 status: 403
925                 message: Request Forbidden
926                 details: This request is forbidden
927               schema:
928                 $ref: '#/components/schemas/ErrorMessage'
929           description: Forbidden
930         "409":
931           content:
932             application/json:
933               example:
934                 status: 409
935                 message: Conflicting request
936                 details: The request cannot be processed as the resource is in use.
937               schema:
938                 $ref: '#/components/schemas/ErrorMessage'
939           description: Conflict
940         "500":
941           content:
942             application/json:
943               example:
944                 status: 500
945                 message: Internal Server Error
946                 details: Internal Server Error occurred
947               schema:
948                 $ref: '#/components/schemas/ErrorMessage'
949           description: Internal Server Error
950       summary: Create a schema set
951       tags:
952       - cps-admin
953   /{apiVersion}/dataspaces/{dataspace-name}/schema-sets:
954     get:
955       description: "Read all schema sets, given a dataspace"
956       operationId: getSchemaSets
957       parameters:
958       - description: apiVersion
959         in: path
960         name: apiVersion
961         required: true
962         schema:
963           default: v2
964           enum:
965           - v1
966           - v2
967           type: string
968       - description: dataspace-name
969         in: path
970         name: dataspace-name
971         required: true
972         schema:
973           example: my-dataspace
974           type: string
975       responses:
976         "200":
977           content:
978             application/json:
979               schema:
980                 items:
981                   $ref: '#/components/schemas/SchemaSetDetails'
982                 type: array
983           description: OK
984         "400":
985           content:
986             application/json:
987               example:
988                 status: 400
989                 message: Bad Request
990                 details: The provided request is not valid
991               schema:
992                 $ref: '#/components/schemas/ErrorMessage'
993           description: Bad Request
994         "401":
995           content:
996             application/json:
997               example:
998                 status: 401
999                 message: Unauthorized request
1000                 details: This request is unauthorized
1001               schema:
1002                 $ref: '#/components/schemas/ErrorMessage'
1003           description: Unauthorized
1004         "403":
1005           content:
1006             application/json:
1007               example:
1008                 status: 403
1009                 message: Request Forbidden
1010                 details: This request is forbidden
1011               schema:
1012                 $ref: '#/components/schemas/ErrorMessage'
1013           description: Forbidden
1014         "500":
1015           content:
1016             application/json:
1017               example:
1018                 status: 500
1019                 message: Internal Server Error
1020                 details: Internal Server Error occurred
1021               schema:
1022                 $ref: '#/components/schemas/ErrorMessage'
1023           description: Internal Server Error
1024       summary: Get schema sets
1025       tags:
1026       - cps-admin
1027   /{apiVersion}/dataspaces/{dataspace-name}/schema-sets/{schema-set-name}:
1028     delete:
1029       description: Delete a schema set given a schema set name and a dataspace
1030       operationId: deleteSchemaSet
1031       parameters:
1032       - description: apiVersion
1033         in: path
1034         name: apiVersion
1035         required: true
1036         schema:
1037           default: v2
1038           enum:
1039           - v1
1040           - v2
1041           type: string
1042       - description: dataspace-name
1043         in: path
1044         name: dataspace-name
1045         required: true
1046         schema:
1047           example: my-dataspace
1048           type: string
1049       - description: schema-set-name
1050         in: path
1051         name: schema-set-name
1052         required: true
1053         schema:
1054           example: my-schema-set
1055           type: string
1056       responses:
1057         "204":
1058           content: {}
1059           description: No Content
1060         "400":
1061           content:
1062             application/json:
1063               example:
1064                 status: 400
1065                 message: Bad Request
1066                 details: The provided request is not valid
1067               schema:
1068                 $ref: '#/components/schemas/ErrorMessage'
1069           description: Bad Request
1070         "401":
1071           content:
1072             application/json:
1073               example:
1074                 status: 401
1075                 message: Unauthorized request
1076                 details: This request is unauthorized
1077               schema:
1078                 $ref: '#/components/schemas/ErrorMessage'
1079           description: Unauthorized
1080         "403":
1081           content:
1082             application/json:
1083               example:
1084                 status: 403
1085                 message: Request Forbidden
1086                 details: This request is forbidden
1087               schema:
1088                 $ref: '#/components/schemas/ErrorMessage'
1089           description: Forbidden
1090         "409":
1091           content:
1092             application/json:
1093               example:
1094                 status: 409
1095                 message: Conflicting request
1096                 details: The request cannot be processed as the resource is in use.
1097               schema:
1098                 $ref: '#/components/schemas/ErrorMessage'
1099           description: Conflict
1100         "500":
1101           content:
1102             application/json:
1103               example:
1104                 status: 500
1105                 message: Internal Server Error
1106                 details: Internal Server Error occurred
1107               schema:
1108                 $ref: '#/components/schemas/ErrorMessage'
1109           description: Internal Server Error
1110       summary: Delete a schema set
1111       tags:
1112       - cps-admin
1113     get:
1114       description: Read a schema set given a schema set name and a dataspace
1115       operationId: getSchemaSet
1116       parameters:
1117       - description: apiVersion
1118         in: path
1119         name: apiVersion
1120         required: true
1121         schema:
1122           default: v2
1123           enum:
1124           - v1
1125           - v2
1126           type: string
1127       - description: dataspace-name
1128         in: path
1129         name: dataspace-name
1130         required: true
1131         schema:
1132           example: my-dataspace
1133           type: string
1134       - description: schema-set-name
1135         in: path
1136         name: schema-set-name
1137         required: true
1138         schema:
1139           example: my-schema-set
1140           type: string
1141       responses:
1142         "200":
1143           content:
1144             application/json:
1145               schema:
1146                 $ref: '#/components/schemas/SchemaSetDetails'
1147           description: OK
1148         "400":
1149           content:
1150             application/json:
1151               example:
1152                 status: 400
1153                 message: Bad Request
1154                 details: The provided request is not valid
1155               schema:
1156                 $ref: '#/components/schemas/ErrorMessage'
1157           description: Bad Request
1158         "401":
1159           content:
1160             application/json:
1161               example:
1162                 status: 401
1163                 message: Unauthorized request
1164                 details: This request is unauthorized
1165               schema:
1166                 $ref: '#/components/schemas/ErrorMessage'
1167           description: Unauthorized
1168         "403":
1169           content:
1170             application/json:
1171               example:
1172                 status: 403
1173                 message: Request Forbidden
1174                 details: This request is forbidden
1175               schema:
1176                 $ref: '#/components/schemas/ErrorMessage'
1177           description: Forbidden
1178         "500":
1179           content:
1180             application/json:
1181               example:
1182                 status: 500
1183                 message: Internal Server Error
1184                 details: Internal Server Error occurred
1185               schema:
1186                 $ref: '#/components/schemas/ErrorMessage'
1187           description: Internal Server Error
1188       summary: Get a schema set
1189       tags:
1190       - cps-admin
1191   /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/node:
1192     get:
1193       deprecated: true
1194       description: Get a node with an option to retrieve all the children for a given
1195         anchor and dataspace
1196       operationId: getNodeByDataspaceAndAnchor
1197       parameters:
1198       - description: dataspace-name
1199         in: path
1200         name: dataspace-name
1201         required: true
1202         schema:
1203           example: my-dataspace
1204           type: string
1205       - description: anchor-name
1206         in: path
1207         name: anchor-name
1208         required: true
1209         schema:
1210           example: my-anchor
1211           type: string
1212       - description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
1213         examples:
1214           container xpath:
1215             value: /shops/bookstore
1216           list attributes xpath:
1217             value: "/shops/bookstore/categories[@code=1]"
1218         in: query
1219         name: xpath
1220         required: false
1221         schema:
1222           default: /
1223           type: string
1224       - description: include-descendants
1225         in: query
1226         name: include-descendants
1227         required: false
1228         schema:
1229           default: false
1230           example: false
1231           type: boolean
1232       responses:
1233         "200":
1234           content:
1235             application/json:
1236               examples:
1237                 dataSample:
1238                   $ref: '#/components/examples/dataSample'
1239                   value: null
1240               schema:
1241                 type: object
1242           description: OK
1243         "400":
1244           content:
1245             application/json:
1246               example:
1247                 status: 400
1248                 message: Bad Request
1249                 details: The provided request is not valid
1250               schema:
1251                 $ref: '#/components/schemas/ErrorMessage'
1252           description: Bad Request
1253         "401":
1254           content:
1255             application/json:
1256               example:
1257                 status: 401
1258                 message: Unauthorized request
1259                 details: This request is unauthorized
1260               schema:
1261                 $ref: '#/components/schemas/ErrorMessage'
1262           description: Unauthorized
1263         "403":
1264           content:
1265             application/json:
1266               example:
1267                 status: 403
1268                 message: Request Forbidden
1269                 details: This request is forbidden
1270               schema:
1271                 $ref: '#/components/schemas/ErrorMessage'
1272           description: Forbidden
1273         "500":
1274           content:
1275             application/json:
1276               example:
1277                 status: 500
1278                 message: Internal Server Error
1279                 details: Internal Server Error occurred
1280               schema:
1281                 $ref: '#/components/schemas/ErrorMessage'
1282           description: Internal Server Error
1283       summary: Get a node
1284       tags:
1285       - cps-data
1286       x-codegen-request-body-name: xpath
1287   /v2/dataspaces/{dataspace-name}/anchors/{anchor-name}/node:
1288     get:
1289       description: Get a node with an option to retrieve all the children for a given
1290         anchor and dataspace
1291       operationId: getNodeByDataspaceAndAnchorV2
1292       parameters:
1293       - description: dataspace-name
1294         in: path
1295         name: dataspace-name
1296         required: true
1297         schema:
1298           example: my-dataspace
1299           type: string
1300       - description: anchor-name
1301         in: path
1302         name: anchor-name
1303         required: true
1304         schema:
1305           example: my-anchor
1306           type: string
1307       - description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
1308         examples:
1309           container xpath:
1310             value: /shops/bookstore
1311           list attributes xpath:
1312             value: "/shops/bookstore/categories[@code=1]"
1313         in: query
1314         name: xpath
1315         required: false
1316         schema:
1317           default: /
1318           type: string
1319       - description: "Number of descendants to query. Allowed values are 'none', 'all',\
1320           \ 'direct', 1 (for direct), -1 (for all), 0 (for none) and any positive\
1321           \ number."
1322         in: query
1323         name: descendants
1324         required: false
1325         schema:
1326           default: none
1327           example: "3"
1328           type: string
1329       responses:
1330         "200":
1331           content:
1332             application/json:
1333               examples:
1334                 dataSample:
1335                   $ref: '#/components/examples/dataSample'
1336                   value: null
1337               schema:
1338                 type: object
1339           description: OK
1340         "400":
1341           content:
1342             application/json:
1343               example:
1344                 status: 400
1345                 message: Bad Request
1346                 details: The provided request is not valid
1347               schema:
1348                 $ref: '#/components/schemas/ErrorMessage'
1349           description: Bad Request
1350         "401":
1351           content:
1352             application/json:
1353               example:
1354                 status: 401
1355                 message: Unauthorized request
1356                 details: This request is unauthorized
1357               schema:
1358                 $ref: '#/components/schemas/ErrorMessage'
1359           description: Unauthorized
1360         "403":
1361           content:
1362             application/json:
1363               example:
1364                 status: 403
1365                 message: Request Forbidden
1366                 details: This request is forbidden
1367               schema:
1368                 $ref: '#/components/schemas/ErrorMessage'
1369           description: Forbidden
1370         "500":
1371           content:
1372             application/json:
1373               example:
1374                 status: 500
1375                 message: Internal Server Error
1376                 details: Internal Server Error occurred
1377               schema:
1378                 $ref: '#/components/schemas/ErrorMessage'
1379           description: Internal Server Error
1380       summary: Get a node
1381       tags:
1382       - cps-data
1383       x-codegen-request-body-name: xpath
1384   /{apiVersion}/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes:
1385     delete:
1386       description: Delete a datanode for a given dataspace and anchor given a node
1387         xpath.
1388       operationId: deleteDataNode
1389       parameters:
1390       - description: apiVersion
1391         in: path
1392         name: apiVersion
1393         required: true
1394         schema:
1395           default: v2
1396           enum:
1397           - v1
1398           - v2
1399           type: string
1400       - description: dataspace-name
1401         in: path
1402         name: dataspace-name
1403         required: true
1404         schema:
1405           example: my-dataspace
1406           type: string
1407       - description: anchor-name
1408         in: path
1409         name: anchor-name
1410         required: true
1411         schema:
1412           example: my-anchor
1413           type: string
1414       - description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
1415         examples:
1416           container xpath:
1417             value: /shops/bookstore
1418           list attributes xpath:
1419             value: "/shops/bookstore/categories[@code=1]"
1420         in: query
1421         name: xpath
1422         required: false
1423         schema:
1424           default: /
1425           type: string
1426       - description: observed-timestamp
1427         in: query
1428         name: observed-timestamp
1429         required: false
1430         schema:
1431           example: 2021-03-21T00:10:34.030-0100
1432           type: string
1433       responses:
1434         "204":
1435           content: {}
1436           description: No Content
1437         "400":
1438           content:
1439             application/json:
1440               example:
1441                 status: 400
1442                 message: Bad Request
1443                 details: The provided request is not valid
1444               schema:
1445                 $ref: '#/components/schemas/ErrorMessage'
1446           description: Bad Request
1447         "401":
1448           content:
1449             application/json:
1450               example:
1451                 status: 401
1452                 message: Unauthorized request
1453                 details: This request is unauthorized
1454               schema:
1455                 $ref: '#/components/schemas/ErrorMessage'
1456           description: Unauthorized
1457         "403":
1458           content:
1459             application/json:
1460               example:
1461                 status: 403
1462                 message: Request Forbidden
1463                 details: This request is forbidden
1464               schema:
1465                 $ref: '#/components/schemas/ErrorMessage'
1466           description: Forbidden
1467         "500":
1468           content:
1469             application/json:
1470               example:
1471                 status: 500
1472                 message: Internal Server Error
1473                 details: Internal Server Error occurred
1474               schema:
1475                 $ref: '#/components/schemas/ErrorMessage'
1476           description: Internal Server Error
1477       summary: Delete a data node
1478       tags:
1479       - cps-data
1480     patch:
1481       description: Update a data node leaves for a given dataspace and anchor and
1482         a parent node xpath. This operation is currently supported for one top level
1483         data node only.
1484       operationId: updateNodeLeaves
1485       parameters:
1486       - description: apiVersion
1487         in: path
1488         name: apiVersion
1489         required: true
1490         schema:
1491           default: v2
1492           enum:
1493           - v1
1494           - v2
1495           type: string
1496       - description: dataspace-name
1497         in: path
1498         name: dataspace-name
1499         required: true
1500         schema:
1501           example: my-dataspace
1502           type: string
1503       - description: anchor-name
1504         in: path
1505         name: anchor-name
1506         required: true
1507         schema:
1508           example: my-anchor
1509           type: string
1510       - description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
1511         examples:
1512           container xpath:
1513             value: /shops/bookstore
1514           list attributes xpath:
1515             value: "/shops/bookstore/categories[@code=1]"
1516         in: query
1517         name: xpath
1518         required: false
1519         schema:
1520           default: /
1521           type: string
1522       - description: observed-timestamp
1523         in: query
1524         name: observed-timestamp
1525         required: false
1526         schema:
1527           example: 2021-03-21T00:10:34.030-0100
1528           type: string
1529       requestBody:
1530         content:
1531           application/json:
1532             examples:
1533               dataSample:
1534                 $ref: '#/components/examples/dataSample'
1535                 value: null
1536             schema:
1537               type: object
1538         required: true
1539       responses:
1540         "200":
1541           content:
1542             application/json:
1543               examples:
1544                 dataSample:
1545                   value: ""
1546               schema:
1547                 type: object
1548           description: OK
1549         "400":
1550           content:
1551             application/json:
1552               example:
1553                 status: 400
1554                 message: Bad Request
1555                 details: The provided request is not valid
1556               schema:
1557                 $ref: '#/components/schemas/ErrorMessage'
1558           description: Bad Request
1559         "401":
1560           content:
1561             application/json:
1562               example:
1563                 status: 401
1564                 message: Unauthorized request
1565                 details: This request is unauthorized
1566               schema:
1567                 $ref: '#/components/schemas/ErrorMessage'
1568           description: Unauthorized
1569         "403":
1570           content:
1571             application/json:
1572               example:
1573                 status: 403
1574                 message: Request Forbidden
1575                 details: This request is forbidden
1576               schema:
1577                 $ref: '#/components/schemas/ErrorMessage'
1578           description: Forbidden
1579         "500":
1580           content:
1581             application/json:
1582               example:
1583                 status: 500
1584                 message: Internal Server Error
1585                 details: Internal Server Error occurred
1586               schema:
1587                 $ref: '#/components/schemas/ErrorMessage'
1588           description: Internal Server Error
1589       summary: Update node leaves
1590       tags:
1591       - cps-data
1592     post:
1593       description: Create a node for a given anchor and dataspace
1594       operationId: createNode
1595       parameters:
1596       - description: apiVersion
1597         in: path
1598         name: apiVersion
1599         required: true
1600         schema:
1601           default: v2
1602           enum:
1603           - v1
1604           - v2
1605           type: string
1606       - description: dataspace-name
1607         in: path
1608         name: dataspace-name
1609         required: true
1610         schema:
1611           example: my-dataspace
1612           type: string
1613       - description: anchor-name
1614         in: path
1615         name: anchor-name
1616         required: true
1617         schema:
1618           example: my-anchor
1619           type: string
1620       - description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
1621         examples:
1622           container xpath:
1623             value: /shops/bookstore
1624           list attributes xpath:
1625             value: "/shops/bookstore/categories[@code=1]"
1626         in: query
1627         name: xpath
1628         required: false
1629         schema:
1630           default: /
1631           type: string
1632       - description: observed-timestamp
1633         in: query
1634         name: observed-timestamp
1635         required: false
1636         schema:
1637           example: 2021-03-21T00:10:34.030-0100
1638           type: string
1639       - description: Content type header
1640         in: header
1641         name: Content-Type
1642         required: true
1643         schema:
1644           example: application/json
1645           type: string
1646       requestBody:
1647         content:
1648           application/json:
1649             examples:
1650               dataSample:
1651                 $ref: '#/components/examples/dataSample'
1652                 value: null
1653             schema:
1654               type: string
1655           application/xml:
1656             examples:
1657               dataSample:
1658                 $ref: '#/components/examples/dataSampleXml'
1659                 value: null
1660             schema:
1661               type: object
1662               xml:
1663                 name: stores
1664         required: true
1665       responses:
1666         "201":
1667           content:
1668             text/plain:
1669               schema:
1670                 example: my-resource
1671                 type: string
1672           description: Created
1673         "400":
1674           content:
1675             application/json:
1676               example:
1677                 status: 400
1678                 message: Bad Request
1679                 details: The provided request is not valid
1680               schema:
1681                 $ref: '#/components/schemas/ErrorMessage'
1682           description: Bad Request
1683         "401":
1684           content:
1685             application/json:
1686               example:
1687                 status: 401
1688                 message: Unauthorized request
1689                 details: This request is unauthorized
1690               schema:
1691                 $ref: '#/components/schemas/ErrorMessage'
1692           description: Unauthorized
1693         "403":
1694           content:
1695             application/json:
1696               example:
1697                 status: 403
1698                 message: Request Forbidden
1699                 details: This request is forbidden
1700               schema:
1701                 $ref: '#/components/schemas/ErrorMessage'
1702           description: Forbidden
1703         "409":
1704           content:
1705             application/json:
1706               example:
1707                 status: 409
1708                 message: Conflicting request
1709                 details: The request cannot be processed as the resource is in use.
1710               schema:
1711                 $ref: '#/components/schemas/ErrorMessage'
1712           description: Conflict
1713         "500":
1714           content:
1715             application/json:
1716               example:
1717                 status: 500
1718                 message: Internal Server Error
1719                 details: Internal Server Error occurred
1720               schema:
1721                 $ref: '#/components/schemas/ErrorMessage'
1722           description: Internal Server Error
1723       summary: Create a node
1724       tags:
1725       - cps-data
1726     put:
1727       description: "Replace a node with descendants for a given dataspace, anchor\
1728         \ and a parent node xpath"
1729       operationId: replaceNode
1730       parameters:
1731       - description: apiVersion
1732         in: path
1733         name: apiVersion
1734         required: true
1735         schema:
1736           default: v2
1737           enum:
1738           - v1
1739           - v2
1740           type: string
1741       - description: dataspace-name
1742         in: path
1743         name: dataspace-name
1744         required: true
1745         schema:
1746           example: my-dataspace
1747           type: string
1748       - description: anchor-name
1749         in: path
1750         name: anchor-name
1751         required: true
1752         schema:
1753           example: my-anchor
1754           type: string
1755       - description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
1756         examples:
1757           container xpath:
1758             value: /shops/bookstore
1759           list attributes xpath:
1760             value: "/shops/bookstore/categories[@code=1]"
1761         in: query
1762         name: xpath
1763         required: false
1764         schema:
1765           default: /
1766           type: string
1767       - description: observed-timestamp
1768         in: query
1769         name: observed-timestamp
1770         required: false
1771         schema:
1772           example: 2021-03-21T00:10:34.030-0100
1773           type: string
1774       requestBody:
1775         content:
1776           application/json:
1777             examples:
1778               dataSample:
1779                 $ref: '#/components/examples/dataSample'
1780                 value: null
1781             schema:
1782               type: object
1783         required: true
1784       responses:
1785         "200":
1786           content:
1787             application/json:
1788               examples:
1789                 dataSample:
1790                   value: ""
1791               schema:
1792                 type: object
1793           description: OK
1794         "400":
1795           content:
1796             application/json:
1797               example:
1798                 status: 400
1799                 message: Bad Request
1800                 details: The provided request is not valid
1801               schema:
1802                 $ref: '#/components/schemas/ErrorMessage'
1803           description: Bad Request
1804         "401":
1805           content:
1806             application/json:
1807               example:
1808                 status: 401
1809                 message: Unauthorized request
1810                 details: This request is unauthorized
1811               schema:
1812                 $ref: '#/components/schemas/ErrorMessage'
1813           description: Unauthorized
1814         "403":
1815           content:
1816             application/json:
1817               example:
1818                 status: 403
1819                 message: Request Forbidden
1820                 details: This request is forbidden
1821               schema:
1822                 $ref: '#/components/schemas/ErrorMessage'
1823           description: Forbidden
1824         "500":
1825           content:
1826             application/json:
1827               example:
1828                 status: 500
1829                 message: Internal Server Error
1830                 details: Internal Server Error occurred
1831               schema:
1832                 $ref: '#/components/schemas/ErrorMessage'
1833           description: Internal Server Error
1834       summary: Replace a node with descendants
1835       tags:
1836       - cps-data
1837   /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/list-nodes:
1838     delete:
1839       deprecated: true
1840       description: Delete one or all list element(s) for a given anchor and dataspace
1841       operationId: deleteListOrListElement
1842       parameters:
1843       - description: dataspace-name
1844         in: path
1845         name: dataspace-name
1846         required: true
1847         schema:
1848           example: my-dataspace
1849           type: string
1850       - description: anchor-name
1851         in: path
1852         name: anchor-name
1853         required: true
1854         schema:
1855           example: my-anchor
1856           type: string
1857       - description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
1858         examples:
1859           container xpath:
1860             value: /shops/bookstore
1861           list attributes xpath:
1862             value: "/shops/bookstore/categories[@code=1]"
1863         in: query
1864         name: xpath
1865         required: true
1866         schema:
1867           type: string
1868       - description: observed-timestamp
1869         in: query
1870         name: observed-timestamp
1871         required: false
1872         schema:
1873           example: 2021-03-21T00:10:34.030-0100
1874           type: string
1875       responses:
1876         "204":
1877           content: {}
1878           description: No Content
1879         "400":
1880           content:
1881             application/json:
1882               example:
1883                 status: 400
1884                 message: Bad Request
1885                 details: The provided request is not valid
1886               schema:
1887                 $ref: '#/components/schemas/ErrorMessage'
1888           description: Bad Request
1889         "401":
1890           content:
1891             application/json:
1892               example:
1893                 status: 401
1894                 message: Unauthorized request
1895                 details: This request is unauthorized
1896               schema:
1897                 $ref: '#/components/schemas/ErrorMessage'
1898           description: Unauthorized
1899         "403":
1900           content:
1901             application/json:
1902               example:
1903                 status: 403
1904                 message: Request Forbidden
1905                 details: This request is forbidden
1906               schema:
1907                 $ref: '#/components/schemas/ErrorMessage'
1908           description: Forbidden
1909         "500":
1910           content:
1911             application/json:
1912               example:
1913                 status: 500
1914                 message: Internal Server Error
1915                 details: Internal Server Error occurred
1916               schema:
1917                 $ref: '#/components/schemas/ErrorMessage'
1918           description: Internal Server Error
1919       summary: Delete one or all list element(s)
1920       tags:
1921       - cps-data
1922   /{apiVersion}/dataspaces/{dataspace-name}/anchors/{anchor-name}/list-nodes:
1923     post:
1924       description: Add list element(s) to a list for a given anchor and dataspace
1925       operationId: addListElements
1926       parameters:
1927       - description: apiVersion
1928         in: path
1929         name: apiVersion
1930         required: true
1931         schema:
1932           default: v2
1933           enum:
1934           - v1
1935           - v2
1936           type: string
1937       - description: dataspace-name
1938         in: path
1939         name: dataspace-name
1940         required: true
1941         schema:
1942           example: my-dataspace
1943           type: string
1944       - description: anchor-name
1945         in: path
1946         name: anchor-name
1947         required: true
1948         schema:
1949           example: my-anchor
1950           type: string
1951       - description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
1952         examples:
1953           container xpath:
1954             value: /shops/bookstore
1955           list attributes xpath:
1956             value: "/shops/bookstore/categories[@code=1]"
1957         in: query
1958         name: xpath
1959         required: true
1960         schema:
1961           type: string
1962       - description: observed-timestamp
1963         in: query
1964         name: observed-timestamp
1965         required: false
1966         schema:
1967           example: 2021-03-21T00:10:34.030-0100
1968           type: string
1969       requestBody:
1970         content:
1971           application/json:
1972             examples:
1973               dataSample:
1974                 $ref: '#/components/examples/dataSample'
1975                 value: null
1976             schema:
1977               type: object
1978         required: true
1979       responses:
1980         "201":
1981           content:
1982             text/plain:
1983               schema:
1984                 example: my-resource
1985                 type: string
1986           description: Created
1987         "400":
1988           content:
1989             application/json:
1990               example:
1991                 status: 400
1992                 message: Bad Request
1993                 details: The provided request is not valid
1994               schema:
1995                 $ref: '#/components/schemas/ErrorMessage'
1996           description: Bad Request
1997         "401":
1998           content:
1999             application/json:
2000               example:
2001                 status: 401
2002                 message: Unauthorized request
2003                 details: This request is unauthorized
2004               schema:
2005                 $ref: '#/components/schemas/ErrorMessage'
2006           description: Unauthorized
2007         "403":
2008           content:
2009             application/json:
2010               example:
2011                 status: 403
2012                 message: Request Forbidden
2013                 details: This request is forbidden
2014               schema:
2015                 $ref: '#/components/schemas/ErrorMessage'
2016           description: Forbidden
2017         "500":
2018           content:
2019             application/json:
2020               example:
2021                 status: 500
2022                 message: Internal Server Error
2023                 details: Internal Server Error occurred
2024               schema:
2025                 $ref: '#/components/schemas/ErrorMessage'
2026           description: Internal Server Error
2027       summary: Add list element(s)
2028       tags:
2029       - cps-data
2030     put:
2031       description: "Replace list content under a given parent, anchor and dataspace"
2032       operationId: replaceListContent
2033       parameters:
2034       - description: apiVersion
2035         in: path
2036         name: apiVersion
2037         required: true
2038         schema:
2039           default: v2
2040           enum:
2041           - v1
2042           - v2
2043           type: string
2044       - description: dataspace-name
2045         in: path
2046         name: dataspace-name
2047         required: true
2048         schema:
2049           example: my-dataspace
2050           type: string
2051       - description: anchor-name
2052         in: path
2053         name: anchor-name
2054         required: true
2055         schema:
2056           example: my-anchor
2057           type: string
2058       - description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
2059         examples:
2060           container xpath:
2061             value: /shops/bookstore
2062           list attributes xpath:
2063             value: "/shops/bookstore/categories[@code=1]"
2064         in: query
2065         name: xpath
2066         required: true
2067         schema:
2068           type: string
2069       - description: observed-timestamp
2070         in: query
2071         name: observed-timestamp
2072         required: false
2073         schema:
2074           example: 2021-03-21T00:10:34.030-0100
2075           type: string
2076       requestBody:
2077         content:
2078           application/json:
2079             examples:
2080               dataSample:
2081                 $ref: '#/components/examples/dataSample'
2082                 value: null
2083             schema:
2084               type: object
2085         required: true
2086       responses:
2087         "200":
2088           content:
2089             application/json:
2090               examples:
2091                 dataSample:
2092                   value: ""
2093               schema:
2094                 type: object
2095           description: OK
2096         "400":
2097           content:
2098             application/json:
2099               example:
2100                 status: 400
2101                 message: Bad Request
2102                 details: The provided request is not valid
2103               schema:
2104                 $ref: '#/components/schemas/ErrorMessage'
2105           description: Bad Request
2106         "401":
2107           content:
2108             application/json:
2109               example:
2110                 status: 401
2111                 message: Unauthorized request
2112                 details: This request is unauthorized
2113               schema:
2114                 $ref: '#/components/schemas/ErrorMessage'
2115           description: Unauthorized
2116         "403":
2117           content:
2118             application/json:
2119               example:
2120                 status: 403
2121                 message: Request Forbidden
2122                 details: This request is forbidden
2123               schema:
2124                 $ref: '#/components/schemas/ErrorMessage'
2125           description: Forbidden
2126         "500":
2127           content:
2128             application/json:
2129               example:
2130                 status: 500
2131                 message: Internal Server Error
2132                 details: Internal Server Error occurred
2133               schema:
2134                 $ref: '#/components/schemas/ErrorMessage'
2135           description: Internal Server Error
2136       summary: Replace list content
2137       tags:
2138       - cps-data
2139   /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes/query:
2140     get:
2141       deprecated: true
2142       description: Query data nodes for the given dataspace and anchor using CPS path
2143       operationId: getNodesByDataspaceAndAnchorAndCpsPath
2144       parameters:
2145       - description: dataspace-name
2146         in: path
2147         name: dataspace-name
2148         required: true
2149         schema:
2150           example: my-dataspace
2151           type: string
2152       - description: anchor-name
2153         in: path
2154         name: anchor-name
2155         required: true
2156         schema:
2157           example: my-anchor
2158           type: string
2159       - description: "For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
2160         examples:
2161           container cps path:
2162             value: //bookstore
2163           list attributes cps path:
2164             value: "//categories[@code=1]"
2165         in: query
2166         name: cps-path
2167         required: false
2168         schema:
2169           default: /
2170           type: string
2171       - description: include-descendants
2172         in: query
2173         name: include-descendants
2174         required: false
2175         schema:
2176           default: false
2177           example: false
2178           type: boolean
2179       responses:
2180         "200":
2181           content:
2182             application/json:
2183               examples:
2184                 dataSample:
2185                   $ref: '#/components/examples/dataSample'
2186                   value: null
2187               schema:
2188                 type: object
2189           description: OK
2190         "400":
2191           content:
2192             application/json:
2193               example:
2194                 status: 400
2195                 message: Bad Request
2196                 details: The provided request is not valid
2197               schema:
2198                 $ref: '#/components/schemas/ErrorMessage'
2199           description: Bad Request
2200         "401":
2201           content:
2202             application/json:
2203               example:
2204                 status: 401
2205                 message: Unauthorized request
2206                 details: This request is unauthorized
2207               schema:
2208                 $ref: '#/components/schemas/ErrorMessage'
2209           description: Unauthorized
2210         "403":
2211           content:
2212             application/json:
2213               example:
2214                 status: 403
2215                 message: Request Forbidden
2216                 details: This request is forbidden
2217               schema:
2218                 $ref: '#/components/schemas/ErrorMessage'
2219           description: Forbidden
2220         "500":
2221           content:
2222             application/json:
2223               example:
2224                 status: 500
2225                 message: Internal Server Error
2226                 details: Internal Server Error occurred
2227               schema:
2228                 $ref: '#/components/schemas/ErrorMessage'
2229           description: Internal Server Error
2230       summary: Query data nodes
2231       tags:
2232       - cps-query
2233       x-codegen-request-body-name: xpath
2234   /v2/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes/query:
2235     get:
2236       description: Query data nodes for the given dataspace and anchor using CPS path
2237       operationId: getNodesByDataspaceAndAnchorAndCpsPathV2
2238       parameters:
2239       - description: dataspace-name
2240         in: path
2241         name: dataspace-name
2242         required: true
2243         schema:
2244           example: my-dataspace
2245           type: string
2246       - description: anchor-name
2247         in: path
2248         name: anchor-name
2249         required: true
2250         schema:
2251           example: my-anchor
2252           type: string
2253       - description: "For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
2254         examples:
2255           container cps path:
2256             value: //bookstore
2257           list attributes cps path:
2258             value: "//categories[@code=1]"
2259         in: query
2260         name: cps-path
2261         required: false
2262         schema:
2263           default: /
2264           type: string
2265       - description: "Number of descendants to query. Allowed values are 'none', 'all',\
2266           \ 'direct', 1 (for direct), -1 (for all), 0 (for none) and any positive\
2267           \ number."
2268         in: query
2269         name: descendants
2270         required: false
2271         schema:
2272           default: none
2273           example: "3"
2274           type: string
2275       responses:
2276         "200":
2277           content:
2278             application/json:
2279               examples:
2280                 dataSample:
2281                   $ref: '#/components/examples/dataSample'
2282                   value: null
2283               schema:
2284                 type: object
2285           description: OK
2286         "400":
2287           content:
2288             application/json:
2289               example:
2290                 status: 400
2291                 message: Bad Request
2292                 details: The provided request is not valid
2293               schema:
2294                 $ref: '#/components/schemas/ErrorMessage'
2295           description: Bad Request
2296         "401":
2297           content:
2298             application/json:
2299               example:
2300                 status: 401
2301                 message: Unauthorized request
2302                 details: This request is unauthorized
2303               schema:
2304                 $ref: '#/components/schemas/ErrorMessage'
2305           description: Unauthorized
2306         "403":
2307           content:
2308             application/json:
2309               example:
2310                 status: 403
2311                 message: Request Forbidden
2312                 details: This request is forbidden
2313               schema:
2314                 $ref: '#/components/schemas/ErrorMessage'
2315           description: Forbidden
2316         "500":
2317           content:
2318             application/json:
2319               example:
2320                 status: 500
2321                 message: Internal Server Error
2322                 details: Internal Server Error occurred
2323               schema:
2324                 $ref: '#/components/schemas/ErrorMessage'
2325           description: Internal Server Error
2326       summary: Query data nodes
2327       tags:
2328       - cps-query
2329       x-codegen-request-body-name: xpath
2330   /v2/dataspaces/{dataspace-name}/nodes/query:
2331     get:
2332       description: Query data nodes for the given dataspace across anchors using CPS
2333         path
2334       operationId: getNodesByDataspaceAndCpsPath
2335       parameters:
2336       - description: dataspace-name
2337         in: path
2338         name: dataspace-name
2339         required: true
2340         schema:
2341           example: my-dataspace
2342           type: string
2343       - description: "For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
2344         examples:
2345           container cps path:
2346             value: //bookstore
2347           list attributes cps path:
2348             value: "//categories[@code=1]"
2349         in: query
2350         name: cps-path
2351         required: false
2352         schema:
2353           default: /
2354           type: string
2355       - description: "Number of descendants to query. Allowed values are 'none', 'all',\
2356           \ 'direct', 1 (for direct), -1 (for all), 0 (for none) and any positive\
2357           \ number."
2358         in: query
2359         name: descendants
2360         required: false
2361         schema:
2362           default: none
2363           example: "3"
2364           type: string
2365       - description: page index for pagination over anchors. It must be greater then
2366           zero if provided.
2367         in: query
2368         name: pageIndex
2369         required: false
2370         schema:
2371           example: 1
2372           type: integer
2373       - description: number of records (anchors) per page. It must be greater then
2374           zero if provided.
2375         in: query
2376         name: pageSize
2377         required: false
2378         schema:
2379           example: 10
2380           type: integer
2381       responses:
2382         "200":
2383           content:
2384             application/json:
2385               examples:
2386                 dataSample:
2387                   $ref: '#/components/examples/dataSampleAcrossAnchors'
2388                   value: null
2389               schema:
2390                 type: object
2391           description: OK
2392         "400":
2393           content:
2394             application/json:
2395               example:
2396                 status: 400
2397                 message: Bad Request
2398                 details: The provided request is not valid
2399               schema:
2400                 $ref: '#/components/schemas/ErrorMessage'
2401           description: Bad Request
2402         "401":
2403           content:
2404             application/json:
2405               example:
2406                 status: 401
2407                 message: Unauthorized request
2408                 details: This request is unauthorized
2409               schema:
2410                 $ref: '#/components/schemas/ErrorMessage'
2411           description: Unauthorized
2412         "403":
2413           content:
2414             application/json:
2415               example:
2416                 status: 403
2417                 message: Request Forbidden
2418                 details: This request is forbidden
2419               schema:
2420                 $ref: '#/components/schemas/ErrorMessage'
2421           description: Forbidden
2422         "500":
2423           content:
2424             application/json:
2425               example:
2426                 status: 500
2427                 message: Internal Server Error
2428                 details: Internal Server Error occurred
2429               schema:
2430                 $ref: '#/components/schemas/ErrorMessage'
2431           description: Internal Server Error
2432       summary: Query data nodes across anchors
2433       tags:
2434       - cps-query
2435       x-codegen-request-body-name: xpath
2436 components:
2437   examples:
2438     dataSample:
2439       value:
2440         test:bookstore:
2441           bookstore-name: Chapters
2442           categories:
2443           - code: 1
2444             name: SciFi
2445           - code: 2
2446             name: kids
2447     dataSampleXml:
2448       value: <stores xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <bookstore xmlns="org:onap:ccsdk:sample">
2449         <bookstore-name>Chapters</bookstore-name> <categories> <code>1</code> <name>SciFi</name>
2450         </categories> </bookstore> </stores>
2451     dataSampleAcrossAnchors:
2452       value:
2453       - anchorName: bookstore1
2454         dataNode:
2455           test:bookstore:
2456             bookstore-name: Chapters
2457             categories:
2458             - code: 1
2459               name: SciFi
2460             - code: 2
2461               name: kids
2462       - anchorName: bookstore2
2463         dataNode:
2464           test:bookstore:
2465             bookstore-name: Chapters
2466             categories:
2467             - code: 1
2468               name: SciFi
2469             - code: 2
2470               name: kids
2471   parameters:
2472     dataspaceNameInQuery:
2473       description: dataspace-name
2474       in: query
2475       name: dataspace-name
2476       required: true
2477       schema:
2478         example: my-dataspace
2479         type: string
2480     apiVersionInPath:
2481       description: apiVersion
2482       in: path
2483       name: apiVersion
2484       required: true
2485       schema:
2486         default: v2
2487         enum:
2488         - v1
2489         - v2
2490         type: string
2491     dataspaceNameInPath:
2492       description: dataspace-name
2493       in: path
2494       name: dataspace-name
2495       required: true
2496       schema:
2497         example: my-dataspace
2498         type: string
2499     schemaSetNameInQuery:
2500       description: schema-set-name
2501       in: query
2502       name: schema-set-name
2503       required: true
2504       schema:
2505         example: my-schema-set
2506         type: string
2507     anchorNameInQuery:
2508       description: anchor-name
2509       in: query
2510       name: anchor-name
2511       required: true
2512       schema:
2513         example: my-anchor
2514         type: string
2515     anchorNameInPath:
2516       description: anchor-name
2517       in: path
2518       name: anchor-name
2519       required: true
2520       schema:
2521         example: my-anchor
2522         type: string
2523     schemaSetNameInPath:
2524       description: schema-set-name
2525       in: path
2526       name: schema-set-name
2527       required: true
2528       schema:
2529         example: my-schema-set
2530         type: string
2531     xpathInQuery:
2532       description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
2533       examples:
2534         container xpath:
2535           value: /shops/bookstore
2536         list attributes xpath:
2537           value: "/shops/bookstore/categories[@code=1]"
2538       in: query
2539       name: xpath
2540       required: false
2541       schema:
2542         default: /
2543         type: string
2544     includeDescendantsOptionInQuery:
2545       description: include-descendants
2546       in: query
2547       name: include-descendants
2548       required: false
2549       schema:
2550         default: false
2551         example: false
2552         type: boolean
2553     descendantsInQuery:
2554       description: "Number of descendants to query. Allowed values are 'none', 'all',\
2555         \ 'direct', 1 (for direct), -1 (for all), 0 (for none) and any positive number."
2556       in: query
2557       name: descendants
2558       required: false
2559       schema:
2560         default: none
2561         example: "3"
2562         type: string
2563     observedTimestampInQuery:
2564       description: observed-timestamp
2565       in: query
2566       name: observed-timestamp
2567       required: false
2568       schema:
2569         example: 2021-03-21T00:10:34.030-0100
2570         type: string
2571     contentTypeHeader:
2572       description: Content type header
2573       in: header
2574       name: Content-Type
2575       required: true
2576       schema:
2577         example: application/json
2578         type: string
2579     requiredXpathInQuery:
2580       description: "For more details on xpath, please refer https://docs.onap.org/projects/onap-cps/en/latest/xpath.html"
2581       examples:
2582         container xpath:
2583           value: /shops/bookstore
2584         list attributes xpath:
2585           value: "/shops/bookstore/categories[@code=1]"
2586       in: query
2587       name: xpath
2588       required: true
2589       schema:
2590         type: string
2591     cpsPathInQuery:
2592       description: "For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html"
2593       examples:
2594         container cps path:
2595           value: //bookstore
2596         list attributes cps path:
2597           value: "//categories[@code=1]"
2598       in: query
2599       name: cps-path
2600       required: false
2601       schema:
2602         default: /
2603         type: string
2604     pageIndexInQuery:
2605       description: page index for pagination over anchors. It must be greater then
2606         zero if provided.
2607       in: query
2608       name: pageIndex
2609       required: false
2610       schema:
2611         example: 1
2612         type: integer
2613     pageSizeInQuery:
2614       description: number of records (anchors) per page. It must be greater then zero
2615         if provided.
2616       in: query
2617       name: pageSize
2618       required: false
2619       schema:
2620         example: 10
2621         type: integer
2622   responses:
2623     Created:
2624       content:
2625         text/plain:
2626           schema:
2627             example: my-resource
2628             type: string
2629       description: Created
2630     BadRequest:
2631       content:
2632         application/json:
2633           example:
2634             status: 400
2635             message: Bad Request
2636             details: The provided request is not valid
2637           schema:
2638             $ref: '#/components/schemas/ErrorMessage'
2639       description: Bad Request
2640     Unauthorized:
2641       content:
2642         application/json:
2643           example:
2644             status: 401
2645             message: Unauthorized request
2646             details: This request is unauthorized
2647           schema:
2648             $ref: '#/components/schemas/ErrorMessage'
2649       description: Unauthorized
2650     Forbidden:
2651       content:
2652         application/json:
2653           example:
2654             status: 403
2655             message: Request Forbidden
2656             details: This request is forbidden
2657           schema:
2658             $ref: '#/components/schemas/ErrorMessage'
2659       description: Forbidden
2660     Conflict:
2661       content:
2662         application/json:
2663           example:
2664             status: 409
2665             message: Conflicting request
2666             details: The request cannot be processed as the resource is in use.
2667           schema:
2668             $ref: '#/components/schemas/ErrorMessage'
2669       description: Conflict
2670     InternalServerError:
2671       content:
2672         application/json:
2673           example:
2674             status: 500
2675             message: Internal Server Error
2676             details: Internal Server Error occurred
2677           schema:
2678             $ref: '#/components/schemas/ErrorMessage'
2679       description: Internal Server Error
2680     NoContent:
2681       content: {}
2682       description: No Content
2683     CreatedV2:
2684       description: Created without response body
2685     Ok:
2686       content:
2687         application/json:
2688           examples:
2689             dataSample:
2690               value: ""
2691           schema:
2692             type: object
2693       description: OK
2694   schemas:
2695     ErrorMessage:
2696       properties:
2697         status:
2698           type: string
2699         message:
2700           type: string
2701         details:
2702           type: string
2703       title: Error
2704       type: object
2705     DataspaceDetails:
2706       example:
2707         name: my-dataspace
2708       properties:
2709         name:
2710           example: my-dataspace
2711           type: string
2712       title: Dataspace details by dataspace Name
2713       type: object
2714     AnchorDetails:
2715       example:
2716         schemaSetName: my-schema-set
2717         dataspaceName: my-dataspace
2718         name: my-anchor
2719       properties:
2720         name:
2721           example: my-anchor
2722           type: string
2723         dataspaceName:
2724           example: my-dataspace
2725           type: string
2726         schemaSetName:
2727           example: my-schema-set
2728           type: string
2729       title: Anchor details by anchor Name
2730       type: object
2731     MultipartFile:
2732       properties:
2733         file:
2734           description: multipartFile
2735           format: binary
2736           type: string
2737       required:
2738       - file
2739       type: object
2740     SchemaSetDetails:
2741       example:
2742         dataspaceName: my-dataspace
2743         name: my-schema-set
2744         moduleReferences:
2745         - name: my-module-reference-name
2746           namespace: my-module-reference-namespace
2747           revision: my-module-reference-revision
2748         - name: my-module-reference-name
2749           namespace: my-module-reference-namespace
2750           revision: my-module-reference-revision
2751       properties:
2752         dataspaceName:
2753           example: my-dataspace
2754           type: string
2755         moduleReferences:
2756           items:
2757             $ref: '#/components/schemas/ModuleReferences'
2758           type: array
2759         name:
2760           example: my-schema-set
2761           type: string
2762       required:
2763       - moduleReferences
2764       title: Schema set details by dataspace and schemasetName
2765       type: object
2766     ModuleReferences:
2767       example:
2768         name: my-module-reference-name
2769         namespace: my-module-reference-namespace
2770         revision: my-module-reference-revision
2771       properties:
2772         name:
2773           example: my-module-reference-name
2774           type: string
2775         namespace:
2776           example: my-module-reference-namespace
2777           type: string
2778         revision:
2779           example: my-module-reference-revision
2780           type: string
2781       title: Module reference object
2782       type: object
2783   securitySchemes:
2784     basicAuth:
2785       scheme: basic
2786       type: http