Fix component field in Datajobs API 94/140894/2
authoregernug <gerard.nugent@est.tech>
Fri, 16 May 2025 08:23:25 +0000 (09:23 +0100)
committeregernug <gerard.nugent@est.tech>
Fri, 16 May 2025 08:33:55 +0000 (09:33 +0100)
When using an external component file it can be named anything but
an internal file must use components as the top level key

Issue-ID: CPS-2811

Change-Id: Id2e5ae24c9a78afe81b92fc972fcc2ffe38fab74
Signed-off-by: egernug <gerard.nugent@est.tech>
docs/api/swagger/dmi/openapi-datajob.yml

index 860486c..62b32d5 100644 (file)
@@ -32,62 +32,62 @@ paths:
       description: Create a read request
       operationId: readDataJob
       parameters:
-        - $ref: '#/dmi-components/parameters/destinationInQuery'
+        - $ref: '#/components/parameters/destinationInQuery'
       requestBody:
         description: Operation body
         content:
           application/3gpp-json-patch+json:
             schema:
-              $ref: '#/dmi-components/schemas/SubjobReadRequest'
+              $ref: '#/components/schemas/SubjobReadRequest'
       tags:
         - dmi-datajob
       responses:
         "501":
-          $ref: '#/dmi-components/responses/NotImplemented'
+          $ref: '#/components/responses/NotImplemented'
   /v1/cmwriteJob:
     post:
       description: Create a write request
       operationId: writeDataJob
       parameters:
-        - $ref: '#/dmi-components/parameters/destinationInQuery'
+        - $ref: '#/components/parameters/destinationInQuery'
       requestBody:
         description: Operation body
         content:
           application/3gpp-json-patch+json:
             schema:
-              $ref: '#/dmi-components/schemas/SubjobWriteRequest'
+              $ref: '#/components/schemas/SubjobWriteRequest'
       tags:
         - dmi-datajob
       responses:
         "501":
-          $ref: '#/dmi-components/responses/NotImplemented'
+          $ref: '#/components/responses/NotImplemented'
   /v1/cmwriteJob/dataProducer/{dataProducerId}/dataProducerJob/{dataProducerJobId}/status:
     get:
       description: Retrieve the status of a specific data job.
       operationId: getDataJobStatus
       parameters:
-        - $ref: '#/dmi-components/parameters/dataProducerIdInPath'
-        - $ref: '#/dmi-components/parameters/dataProducerJobIdInPath'
+        - $ref: '#/components/parameters/dataProducerIdInPath'
+        - $ref: '#/components/parameters/dataProducerJobIdInPath'
       tags:
         - dmi-datajob
       responses:
         "501":
-          $ref: '#/dmi-components/responses/NotImplemented'
+          $ref: '#/components/responses/NotImplemented'
   /v1/cmwriteJob/dataProducer/{dataProducerId}/dataProducerJob/{dataProducerJobId}/result:
     get:
       description: Retrieve the result of a data job.
       operationId: getDataJobResult
       parameters:
-        - $ref: '#/dmi-components/parameters/dataProducerIdInPath'
-        - $ref: '#/dmi-components/parameters/dataProducerJobIdInPath'
-        - $ref: '#/dmi-components/parameters/destinationInQuery'
+        - $ref: '#/components/parameters/dataProducerIdInPath'
+        - $ref: '#/components/parameters/dataProducerJobIdInPath'
+        - $ref: '#/components/parameters/destinationInQuery'
       tags:
         - dmi-datajob
       responses:
         "501":
-          $ref: '#/dmi-components/responses/NotImplemented'
+          $ref: '#/components/responses/NotImplemented'
 
-dmi-components:
+components:
   parameters:
     requestIdInPath:
       description: Identifier for the overall Datajob
@@ -214,7 +214,7 @@ dmi-components:
                 type: string
               cmHandleProperties:
                 description: Private properties of the cm handle for the given path
-                $ref: '#/dmi-components/schemas/CmHandleProperties'
+                $ref: '#/components/schemas/CmHandleProperties'
     SubjobWriteRequest:
       type: object
       required:
@@ -270,14 +270,14 @@ dmi-components:
                 type: string
               cmHandleProperties:
                 description: Private properties of the cm handle for the given path
-                $ref: '#/dmi-components/schemas/CmHandleProperties'
+                $ref: '#/components/schemas/CmHandleProperties'
               value:
                 description: Value dependent on the op specified. Resource for an add. Object for a replace. ActionParameters for an action.
                 type: object
                 oneOf:
-                  - $ref: '#/dmi-components/schemas/Resource'
-                  - $ref: '#/dmi-components/schemas/ActionParameters'
-                  - $ref: '#/dmi-components/schemas/Object'
+                  - $ref: '#/components/schemas/Resource'
+                  - $ref: '#/components/schemas/ActionParameters'
+                  - $ref: '#/components/schemas/Object'
     CmHandleProperties:
       description: Private properties of the cm handle for the given path
       type: object
@@ -326,7 +326,7 @@ dmi-components:
       content:
         application/json:
           schema:
-            $ref: '#/dmi-components/schemas/ErrorMessage'
+            $ref: '#/components/schemas/ErrorMessage'
           example:
             status: 501
             message: Not Implemented