Skip to content

Commit

Permalink
Merge "REST: Add "Patch Property Aliases" to OAS"
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins-bot authored and Gerrit Code Review committed Oct 10, 2023
2 parents fcce757 + 571f7f7 commit a348256
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
41 changes: 41 additions & 0 deletions repo/rest-api/specs/global/responses.json
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,29 @@
}
}
},
"InvalidPropertyPatchRequest": {
"description": "The provided JSON Patch request is invalid",
"content": {
"application/json": {
"schema": { "$ref": "./response-parts.json#/ContextError" },
"examples": {
"invalid-property-id": { "$ref": "./examples.json#/InvalidPropertyIdExample" },
"invalid-edit-tag": { "$ref": "./examples.json#/InvalidEditTagExample" },
"comment-too-long": { "$ref": "./examples.json#/CommentTooLongExample" },
"invalid-patch": { "$ref": "./examples.json#/InvalidPatchExample" },
"invalid-patch-operation": { "$ref": "./examples.json#/InvalidPatchOperationExample" },
"invalid-patch-field-type": { "$ref": "./examples.json#/InvalidPatchFieldTypeExample" },
"missing-json-patch-field": { "$ref": "./examples.json#/MissingJsonPatchFieldExample" }
}
}
},
"headers": {
"Content-Language": {
"schema": { "type": "string" },
"description": "Language code of the language in which error message is provided"
}
}
},
"CannotApplyItemPatch": {
"description": "The provided JSON Patch cannot be applied",
"content": {
Expand All @@ -792,6 +815,24 @@
}
}
},
"CannotApplyPropertyPatch": {
"description": "The provided JSON Patch cannot be applied",
"content": {
"application/json": {
"schema": { "$ref": "./response-parts.json#/ContextError" },
"examples": {
"patch-test-failed": { "$ref": "./examples.json#/PatchTestFailedExample" },
"patch-target-not-found": { "$ref": "./examples.json#/PatchTargetNotFoundExample" }
}
}
},
"headers": {
"Content-Language": {
"schema": { "type": "string" },
"description": "Language code of the language in which error message is provided"
}
}
},
"InvalidPatchedLabels": {
"description": "Applying the provided JSON Patch results in invalid Labels",
"content": {
Expand Down
23 changes: 23 additions & 0 deletions repo/rest-api/specs/resources/aliases/list-for-property.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,28 @@
"412": { "$ref": "../../global/responses.json#/PreconditionFailedError" },
"500": { "$ref": "../../global/responses.json#/UnexpectedError" }
}
},
"patch": {
"operationId": "patchPropertyAliases",
"tags": [ "aliases" ],
"summary": "[WIP] Change a Property's aliases",
"description": "This endpoint is currently in development and is not recommended for production use",
"parameters": [
{ "$ref": "../../global/parameters.json#/PropertyId" },
{ "$ref": "../../global/parameters.json#/IfMatch" },
{ "$ref": "../../global/parameters.json#/IfNoneMatch" },
{ "$ref": "../../global/parameters.json#/IfUnmodifiedSince" }
],
"requestBody": { "$ref": "../../global/requests.json#/AliasesPatch" },
"responses": {
"200": { "$ref": "../../global/responses.json#/PropertyAliases" },
"400": { "$ref": "../../global/responses.json#/InvalidPropertyPatchRequest" },
"404": { "$ref": "../../global/responses.json#/PropertyNotFound" },
"409": { "$ref": "../../global/responses.json#/CannotApplyPropertyPatch" },
"412": { "$ref": "../../global/responses.json#/PreconditionFailedError" },
"415": { "$ref": "../../global/responses.json#/InvalidMediaType" },
"422": { "$ref": "../../global/responses.json#/InvalidPatchedAliases" },
"500": { "$ref": "../../global/responses.json#/UnexpectedError" }
}
}
}

0 comments on commit a348256

Please sign in to comment.