Skip to content

Commit dd4e762

Browse files
craigtraceybrendandburns
authored andcommitted
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 <[email protected]>
1 parent af31f88 commit dd4e762

File tree

1 file changed

+78
-2
lines changed

1 file changed

+78
-2
lines changed

openapi/custom_objects_spec.json

+78-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
],
107107
"responses": {
108108
"201": {
109-
"description": "Created",
109+
"description": "Created",
110110
"schema": {
111111
"type": "object"
112112
}
@@ -231,7 +231,7 @@
231231
],
232232
"responses": {
233233
"201": {
234-
"description": "Created",
234+
"description": "Created",
235235
"schema": {
236236
"type": "object"
237237
}
@@ -358,6 +358,44 @@
358358
}
359359
}
360360
},
361+
"patch": {
362+
"operationId": "patchClusterCustomObject",
363+
"description": "patch the specified cluster scoped custom object",
364+
"consumes": [
365+
"application/merge-patch+json"
366+
],
367+
"produces": [
368+
"application/json"
369+
],
370+
"schemes": [
371+
"https"
372+
],
373+
"tags": [
374+
"custom_objects"
375+
],
376+
"parameters": [
377+
{
378+
"name": "body",
379+
"in": "body",
380+
"required": true,
381+
"description": "The JSON schema of the Resource to patch.",
382+
"schema": {
383+
"type": "object"
384+
}
385+
}
386+
],
387+
"responses": {
388+
"200": {
389+
"description": "OK",
390+
"schema": {
391+
"type": "object"
392+
}
393+
},
394+
"401": {
395+
"description": "Unauthorized"
396+
}
397+
}
398+
},
361399
"put": {
362400
"operationId": "replaceClusterCustomObject",
363401
"description": "replace the specified cluster scoped custom object",
@@ -520,6 +558,44 @@
520558
}
521559
}
522560
},
561+
"patch": {
562+
"operationId": "patchNamespacedCustomObject",
563+
"description": "patch the specified namespace scoped custom object",
564+
"consumes": [
565+
"application/merge-patch+json"
566+
],
567+
"produces": [
568+
"application/json"
569+
],
570+
"schemes": [
571+
"https"
572+
],
573+
"tags": [
574+
"custom_objects"
575+
],
576+
"parameters": [
577+
{
578+
"name": "body",
579+
"in": "body",
580+
"required": true,
581+
"description": "The JSON schema of the Resource to patch.",
582+
"schema": {
583+
"type": "object"
584+
}
585+
}
586+
],
587+
"responses": {
588+
"200": {
589+
"description": "OK",
590+
"schema": {
591+
"type": "object"
592+
}
593+
},
594+
"401": {
595+
"description": "Unauthorized"
596+
}
597+
}
598+
},
523599
"put": {
524600
"operationId": "replaceNamespacedCustomObject",
525601
"description": "replace the specified namespace scoped custom object",

0 commit comments

Comments
 (0)