|  | 
| 3 | 3 |   version: 1.0.0 | 
| 4 | 4 |   title: Drafts Management API | 
| 5 | 5 | paths: | 
| 6 |  | -  /orchestrator/drafts: | 
|  | 6 | +  /orchestrator/draft: | 
|  | 7 | +    get: | 
|  | 8 | +      description: get draft by resource name, app, env and resource type | 
|  | 9 | +      parameters: | 
|  | 10 | +        - name: resourceName | 
|  | 11 | +          required: true | 
|  | 12 | +          in: query | 
|  | 13 | +          schema: | 
|  | 14 | +            type: string | 
|  | 15 | +          description: Name of the resource (e.g., ConfigMap name, Secret name, or DeploymentTemplateOverride identifier) | 
|  | 16 | +          example: "restart-env-DeploymentTemplateOverride" | 
|  | 17 | +        - name: appId | 
|  | 18 | +          required: true | 
|  | 19 | +          in: query | 
|  | 20 | +          schema: | 
|  | 21 | +            type: integer | 
|  | 22 | +          description: Application ID | 
|  | 23 | +          example: 26 | 
|  | 24 | +        - name: envId | 
|  | 25 | +          required: true | 
|  | 26 | +          in: query | 
|  | 27 | +          schema: | 
|  | 28 | +            type: integer | 
|  | 29 | +          description: Environment ID | 
|  | 30 | +          example: 26 | 
|  | 31 | +        - name: resourceType | 
|  | 32 | +          required: true | 
|  | 33 | +          in: query | 
|  | 34 | +          schema: | 
|  | 35 | +            type: integer | 
|  | 36 | +          description: Type of resource (0=ConfigMap, 1=Secret, 2=DeploymentTemplate, 3=DeploymentTemplateOverride) | 
|  | 37 | +          example: 3 | 
|  | 38 | +      responses: | 
|  | 39 | +        '200': | 
|  | 40 | +          description: successfully return config draft response | 
|  | 41 | +          content: | 
|  | 42 | +            application/json: | 
|  | 43 | +              schema: | 
|  | 44 | +                $ref: '#/components/schemas/ConfigDraftResponse' | 
|  | 45 | +        '400': | 
|  | 46 | +          description: Bad Request. validation error/wrong request body. | 
|  | 47 | +          content: | 
|  | 48 | +            application/json: | 
|  | 49 | +              schema: | 
|  | 50 | +                $ref: '#/components/schemas/Error' | 
|  | 51 | +        '500': | 
|  | 52 | +          description: Internal Server Error | 
|  | 53 | +          content: | 
|  | 54 | +            application/json: | 
|  | 55 | +              schema: | 
|  | 56 | +                $ref: '#/components/schemas/Error' | 
|  | 57 | +        '403': | 
|  | 58 | +          description: Unauthorized User | 
|  | 59 | +          content: | 
|  | 60 | +            application/json: | 
|  | 61 | +              schema: | 
|  | 62 | +                $ref: '#/components/schemas/Error' | 
| 7 | 63 |     post: | 
| 8 | 64 |       description: create drafts | 
| 9 | 65 |       requestBody: | 
|  | 
| 38 | 94 |             application/json: | 
| 39 | 95 |               schema: | 
| 40 | 96 |                 $ref: '#/components/schemas/Error' | 
| 41 |  | -  /orchestrator/drafts/{draftId}: | 
|  | 97 | +  /orchestrator/draft/{draftId}: | 
| 42 | 98 |     get: | 
| 43 | 99 |       description: fetch draft metadata for draftId | 
| 44 | 100 |       parameters: | 
| @@ -72,7 +128,7 @@ paths: | 
| 72 | 128 |             application/json: | 
| 73 | 129 |               schema: | 
| 74 | 130 |                 $ref: '#/components/schemas/Error' | 
| 75 |  | -  /orchestrator/drafts/version: | 
|  | 131 | +  /orchestrator/draft/version: | 
| 76 | 132 |     put: | 
| 77 | 133 |       description: add drafts version to a draft | 
| 78 | 134 |       requestBody: | 
| @@ -109,7 +165,7 @@ paths: | 
| 109 | 165 |             application/json: | 
| 110 | 166 |               schema: | 
| 111 | 167 |                 $ref: '#/components/schemas/Error' | 
| 112 |  | -  /orchestrator/drafts/version/comments: | 
|  | 168 | +  /orchestrator/draft/version/comments: | 
| 113 | 169 |     delete: | 
| 114 | 170 |       description: delete comment of a user | 
| 115 | 171 |       parameters: | 
| @@ -144,7 +200,7 @@ paths: | 
| 144 | 200 |             application/json: | 
| 145 | 201 |               schema: | 
| 146 | 202 |                 $ref: '#/components/schemas/Error' | 
| 147 |  | -  /orchestrator/drafts/version/comments/{draftId}: | 
|  | 203 | +  /orchestrator/draft/version/comments/{draftId}: | 
| 148 | 204 |     get: | 
| 149 | 205 |       description: get draft comments | 
| 150 | 206 |       parameters: | 
| @@ -178,7 +234,7 @@ paths: | 
| 178 | 234 |             application/json: | 
| 179 | 235 |               schema: | 
| 180 | 236 |                 $ref: '#/components/schemas/Error' | 
| 181 |  | -  /orchestrator/drafts/version/{draftId}: | 
|  | 237 | +  /orchestrator/draft/version/{draftId}: | 
| 182 | 238 |     get: | 
| 183 | 239 |       description: get drafts version metadata | 
| 184 | 240 |       parameters: | 
| @@ -394,7 +450,7 @@ components: | 
| 394 | 450 |       description: 0 for Init, 1 for Discarded, 2 for Published, 3 for AwaitApproval | 
| 395 | 451 |     DraftResourceType: | 
| 396 | 452 |       type: integer | 
| 397 |  | -      description: 0 for Config Map, 1 for Secret and 2 for Deployment Template | 
|  | 453 | +      description: 0 for Config Map, 1 for Secret, 2 for Deployment Template, and 3 for Deployment Template Override | 
| 398 | 454 |     ConfigDraftRequest: | 
| 399 | 455 |       type: object | 
| 400 | 456 |       properties: | 
|  | 
0 commit comments