Skip to content

Commit

Permalink
Add PATCH to CustomObjectsApi (#53)
Browse files Browse the repository at this point in the history
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 <craigtracey@gmail.com>
  • Loading branch information
craigtracey authored and brendandburns committed Feb 14, 2018
1 parent af31f88 commit dd4e762
Showing 1 changed file with 78 additions and 2 deletions.
80 changes: 78 additions & 2 deletions openapi/custom_objects_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
],
"responses": {
"201": {
"description": "Created",
"description": "Created",
"schema": {
"type": "object"
}
Expand Down Expand Up @@ -231,7 +231,7 @@
],
"responses": {
"201": {
"description": "Created",
"description": "Created",
"schema": {
"type": "object"
}
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit dd4e762

Please sign in to comment.