Additional validation for names/identifiers
[cps.git] / cps-rest / docs / openapi / cpsAdmin.yml
index a022ef1..5852c0c 100644 (file)
@@ -1,5 +1,6 @@
 # ============LICENSE_START=======================================================
 # Copyright (c) 2021 Bell Canada.
+# Modifications Copyright (C) 2021-2022 Nordix Foundation
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -34,6 +35,31 @@ dataspaces:
         $ref: 'components.yml#/components/responses/Unauthorized'
       '403':
         $ref: 'components.yml#/components/responses/Forbidden'
+      '409':
+        $ref: 'components.yml#/components/responses/Conflict'
+      '500':
+        $ref: 'components.yml#/components/responses/InternalServerError'
+  delete:
+    description: Delete a dataspace
+    tags:
+      - cps-admin
+    summary: Delete a dataspace
+    operationId: deleteDataspace
+    parameters:
+      - $ref: 'components.yml#/components/parameters/dataspaceNameInQuery'
+    responses:
+      '204':
+        $ref: 'components.yml#/components/responses/NoContent'
+      '400':
+        $ref: 'components.yml#/components/responses/BadRequest'
+      '401':
+        $ref: 'components.yml#/components/responses/Unauthorized'
+      '403':
+        $ref: 'components.yml#/components/responses/Forbidden'
+      '409':
+        $ref: 'components.yml#/components/responses/Conflict'
+      '500':
+        $ref: 'components.yml#/components/responses/InternalServerError'
 
 schemaSet:
   post:
@@ -51,7 +77,6 @@ schemaSet:
         multipart/form-data:
           schema:
             $ref: 'components.yml#/components/schemas/MultipartFile'
-
     responses:
       '201':
         $ref: 'components.yml#/components/responses/Created'
@@ -61,6 +86,10 @@ schemaSet:
         $ref: 'components.yml#/components/responses/Unauthorized'
       '403':
         $ref: 'components.yml#/components/responses/Forbidden'
+      '409':
+        $ref: 'components.yml#/components/responses/Conflict'
+      '500':
+        $ref: 'components.yml#/components/responses/InternalServerError'
 
 schemaSetBySchemaSetName:
   get:
@@ -85,9 +114,8 @@ schemaSetBySchemaSetName:
         $ref: 'components.yml#/components/responses/Unauthorized'
       '403':
         $ref: 'components.yml#/components/responses/Forbidden'
-      '404':
-        $ref: 'components.yml#/components/responses/NotFound'
-
+      '500':
+        $ref: 'components.yml#/components/responses/InternalServerError'
   delete:
     description: Delete a schema set given a schema set name and a dataspace
     tags:
@@ -108,6 +136,8 @@ schemaSetBySchemaSetName:
         $ref: 'components.yml#/components/responses/Forbidden'
       '409':
         $ref: 'components.yml#/components/responses/Conflict'
+      '500':
+        $ref: 'components.yml#/components/responses/InternalServerError'
 
 anchorsByDataspace:
   get:
@@ -133,9 +163,8 @@ anchorsByDataspace:
         $ref: 'components.yml#/components/responses/Unauthorized'
       '403':
         $ref: 'components.yml#/components/responses/Forbidden'
-      '404':
-        $ref: 'components.yml#/components/responses/NotFound'
-
+      '500':
+        $ref: 'components.yml#/components/responses/InternalServerError'
   post:
     description: Create a new anchor in the given dataspace
     tags:
@@ -155,6 +184,10 @@ anchorsByDataspace:
         $ref: 'components.yml#/components/responses/Unauthorized'
       '403':
         $ref: 'components.yml#/components/responses/Forbidden'
+      '409':
+        $ref: 'components.yml#/components/responses/Conflict'
+      '500':
+        $ref: 'components.yml#/components/responses/InternalServerError'
 
 anchorByDataspaceAndAnchorName:
   get:
@@ -179,9 +212,8 @@ anchorByDataspaceAndAnchorName:
         $ref: 'components.yml#/components/responses/Unauthorized'
       '403':
         $ref: 'components.yml#/components/responses/Forbidden'
-      '404':
-        $ref: 'components.yml#/components/responses/NotFound'
-
+      '500':
+        $ref: 'components.yml#/components/responses/InternalServerError'
   delete:
     description: Delete an anchor given an anchor name and a dataspace
     tags:
@@ -199,4 +231,6 @@ anchorByDataspaceAndAnchorName:
       '401':
         $ref: 'components.yml#/components/responses/Unauthorized'
       '403':
-        $ref: 'components.yml#/components/responses/Forbidden'
\ No newline at end of file
+        $ref: 'components.yml#/components/responses/Forbidden'
+      '500':
+        $ref: 'components.yml#/components/responses/InternalServerError'
\ No newline at end of file