Retain: allow flexible object for `value` field in SubjobWriteRequest 56/141056/1
authorsourabh_sourabh <sourabh.sourabh@est.tech>
Fri, 30 May 2025 13:57:32 +0000 (14:57 +0100)
committersourabh_sourabh <sourabh.sourabh@est.tech>
Fri, 30 May 2025 13:57:32 +0000 (14:57 +0100)
Reasons for retaining `additionalProperties: true`:
- Supports dynamic payloads as object. (e.g., add, replace, action)
- Rely on flexible schemas
- Avoids validation issues in polymorphic data use cases

Issue-ID: CPS-2832
Change-Id: I8e8f987756f8c36a8937338d998da1492230256c
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
docs/api/swagger/dmi/openapi-datajob.yml

index 62b32d5..d1ec7bc 100644 (file)
@@ -20,7 +20,7 @@ openapi: 3.0.3
 info:
   title: NCMP Data Subjob API
   description: Support datajobs through one or more subjob for each DMI and Data Producer Identifier combination
-  version: 1.7.0
+  version: "1.7.0"
 servers:
   - url: /dmi
 tags:
@@ -274,33 +274,10 @@ components:
               value:
                 description: Value dependent on the op specified. Resource for an add. Object for a replace. ActionParameters for an action.
                 type: object
-                oneOf:
-                  - $ref: '#/components/schemas/Resource'
-                  - $ref: '#/components/schemas/ActionParameters'
-                  - $ref: '#/components/schemas/Object'
+                additionalProperties: true
     CmHandleProperties:
       description: Private properties of the cm handle for the given path
       type: object
-    Resource:
-      type: object
-      properties:
-        id:
-          description: Identifier of the resource object
-          example: resource-identifier
-          type: string
-        attributes:
-          description: Key value map representing the objects class attributes and values
-          type: object
-          additionalProperties:
-            example: 'userLabel: label11'
-            type: string
-    ActionParameters:
-      description: The input of the action in the form of key value pairs
-      type: object
-      additionalProperties:
-        type: string
-    Object:
-      type: object
     SubjobWriteResponse:
       type: object
       required:
@@ -330,4 +307,4 @@ components:
           example:
             status: 501
             message: Not Implemented
-            details: Method Not Implemented
+            details: Method Not Implemented
\ No newline at end of file