From dd4e762b245a7872be98f07903c0294d79c7d845 Mon Sep 17 00:00:00 2001 From: Craig Tracey Date: Wed, 14 Feb 2018 14:26:10 -0500 Subject: [PATCH] Add PATCH to CustomObjectsApi (#53) Currently the swagger schema for CustomObjectsApi does not support PATCHing CustomObjects; only replacing. Both TPR and CRD support update in their respective schemas. This change adds the swagger schema to PATCH CustomObjects. Signed-off-by: Craig Tracey --- openapi/custom_objects_spec.json | 80 +++++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 2 deletions(-) diff --git a/openapi/custom_objects_spec.json b/openapi/custom_objects_spec.json index 0b369e4..f96b8fd 100644 --- a/openapi/custom_objects_spec.json +++ b/openapi/custom_objects_spec.json @@ -106,7 +106,7 @@ ], "responses": { "201": { - "description": "Created", + "description": "Created", "schema": { "type": "object" } @@ -231,7 +231,7 @@ ], "responses": { "201": { - "description": "Created", + "description": "Created", "schema": { "type": "object" } @@ -358,6 +358,44 @@ } } }, + "patch": { + "operationId": "patchClusterCustomObject", + "description": "patch the specified cluster scoped custom object", + "consumes": [ + "application/merge-patch+json" + ], + "produces": [ + "application/json" + ], + "schemes": [ + "https" + ], + "tags": [ + "custom_objects" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "description": "The JSON schema of the Resource to patch.", + "schema": { + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, "put": { "operationId": "replaceClusterCustomObject", "description": "replace the specified cluster scoped custom object", @@ -520,6 +558,44 @@ } } }, + "patch": { + "operationId": "patchNamespacedCustomObject", + "description": "patch the specified namespace scoped custom object", + "consumes": [ + "application/merge-patch+json" + ], + "produces": [ + "application/json" + ], + "schemes": [ + "https" + ], + "tags": [ + "custom_objects" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "description": "The JSON schema of the Resource to patch.", + "schema": { + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, "put": { "operationId": "replaceNamespacedCustomObject", "description": "replace the specified namespace scoped custom object",