Document ncmp-inventory error code in openapi
[cps.git] / cps-ncmp-rest / docs / openapi / components.yaml
index 7719193..7ed2efe 100644 (file)
@@ -1,6 +1,7 @@
 #  ============LICENSE_START=======================================================
 #  Copyright (C) 2021-2022 Nordix Foundation
 #  Modifications Copyright (C) 2021 Pantheon.tech
+#  Modifications Copyright (C) 2022 Bell Canada
 #  ================================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -93,35 +94,14 @@ components:
           type: array
           items:
             $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
-          example: [
-            {
-              "cmHandle": "my-cm-handle-01",
-              "errorCode": "01",
-              "errorText": "cm-handle already exists"
-            }
-          ]
         failedUpdatedCmHandles:
           type: array
           items:
             $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
-          example: [
-            {
-              "cmHandle": "my-cm-handle-02",
-              "errorCode": "02",
-              "errorText": "cm-handle does not exist"
-            }
-          ]
         failedRemovedCmHandles:
           type: array
           items:
             $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
-          example: [
-            {
-              "cmHandle": "my-cm-handle-02",
-              "errorCode": "02",
-              "errorText": "cm-handle does not exist"
-            }
-          ]
     CmHandlerRegistrationErrorResponse:
       type: object
       properties:
@@ -130,10 +110,10 @@ components:
           example: my-cm-handle
         errorCode:
           type: string
-          example: '01'
+          example: '00'
         errorText:
           type: string
-          example: 'cm-handle already exists'
+          example: 'Unknown error. <error-details>'
 
     RestInputCmHandle:
       required:
@@ -210,6 +190,16 @@ components:
           type: string
           example: my-module-revision
 
+    CmHandleQueryRestParameters:
+      type: object
+      title: Cm Handle query parameters for executing cm handle search
+      properties:
+        publicCmHandleProperties:
+          type: object
+          additionalProperties:
+            type: string
+            example: Book Type
+
     RestOutputCmHandle:
       type: object
       title: CM handle Details
@@ -367,14 +357,6 @@ components:
         sample 3:
           value:
             resourceIdentifier: parent=shops,child=bookstore
-    acceptParamInHeader:
-      name: Accept
-      in: header
-      required: false
-      description: Accept parameter for response, if accept parameter is null, that means client can accept any format.
-      schema:
-        type: string
-        enum: [ application/json, application/yang-data+json ]
     optionsParamInQuery:
       name: options
       in: query