Align DMI Plugin REST API Specification and Implementation

Issue-ID: CPS-824
Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca>
Change-Id: If4478f6afd6a36570dc2d800484cffdb40c256c9
diff --git a/openapi/openapi.yml b/openapi/openapi.yml
index 6605a2d..e977262 100644
--- a/openapi/openapi.yml
+++ b/openapi/openapi.yml
@@ -53,12 +53,11 @@
             application/json:
               schema:
                 $ref: 'components.yml#/components/schemas/ModuleSet'
-        '400':
-          $ref: 'components.yml#/components/responses/BadRequest'
-        '401':
-          $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/ServerError'
+
 
   /v1/ch/{cmHandle}/moduleResources:
     post:
@@ -82,12 +81,10 @@
             application/json:
               schema:
                 $ref: 'components.yml#/components/schemas/YangResources'
-        '400':
-          $ref: 'components.yml#/components/responses/BadRequest'
-        '401':
-          $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/ServerError'
 
   /v1/inventory/cmHandles:
     post:
@@ -114,10 +111,8 @@
                 example: cm-handle registered successfully
         '400':
           $ref: 'components.yml#/components/responses/BadRequest'
-        '401':
-          $ref: 'components.yml#/components/responses/Unauthorized'
-        '403':
-          $ref: 'components.yml#/components/responses/Forbidden'
+        '500':
+          $ref: 'components.yml#/components/responses/ServerError'
 
   /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-operational:
     post:
@@ -150,10 +145,8 @@
                     revision: my-revision
         '400':
           $ref: 'components.yml#/components/responses/BadRequest'
-        '401':
-          $ref: 'components.yml#/components/responses/Unauthorized'
-        '403':
-          $ref: 'components.yml#/components/responses/Forbidden'
+        '500':
+          $ref: 'components.yml#/components/responses/ServerError'
 
   /v1/ch/{cmHandle}/data/ds/ncmp-datastore:passthrough-running:
     post:
@@ -173,24 +166,26 @@
             schema:
               $ref: 'components.yml#/components/schemas/DataAccessRequest'
       responses:
+        '200':
+          description: OK
+          content:
+            application/json:
+              schema:
+                type: object
+                example:
+                  - yangSource: my-yang-source
+                    moduleName: my-module-name
+                    revision: my-revision
         '201':
           description: Created
           content:
             text/plain:
               schema:
                 type: string
-              examples:
-                Read:
-                  value:
-                    - yangSource: my-yang-source
-                      moduleName: my-module-name
-                      revision: my-revision
-                Write:
-                  value: "Created Resource Name"
-
+                example: my-resource
+        '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'
+        '500':
+          $ref: 'components.yml#/components/responses/ServerError'