diff --git a/repo/rest-api/specs/global/examples.json b/repo/rest-api/specs/global/examples.json index a7435bc0a9..2b48cec7b1 100644 --- a/repo/rest-api/specs/global/examples.json +++ b/repo/rest-api/specs/global/examples.json @@ -269,5 +269,15 @@ "statement_property_id": "{property_id_value}" } } + }, + "PermissionDeniedExample": { + "value": { + "code": "permission-denied", + "message": "Access to resource is denied", + "context": { + "denial_reason": "{reason_code}", + "denial_context": "{additional_context}" + } + } } } diff --git a/repo/rest-api/specs/global/responses.json b/repo/rest-api/specs/global/responses.json index edacc388e4..92b122e9c4 100644 --- a/repo/rest-api/specs/global/responses.json +++ b/repo/rest-api/specs/global/responses.json @@ -94,6 +94,25 @@ } } }, + "PermissionDenied": { + "description": "The access to resource was denied", + "content": { + "application/json": { + "schema": { "$ref": "./response-parts.json#/Error" }, + "examples": { + "permission-denied": { "$ref": "./examples.json#/PermissionDeniedExample" } + } + } + }, + "headers": { + "Content-Language": { + "schema": { + "type": "string" + }, + "description": "Language code of the language in which error message is provided" + } + } + }, "ResourceNotFound": { "description": "The specified resource was not found", "content": { diff --git a/repo/rest-api/specs/resources/aliases/aliases-in-language-for-item.json b/repo/rest-api/specs/resources/aliases/aliases-in-language-for-item.json index e433c6abe0..a8e21775bc 100644 --- a/repo/rest-api/specs/resources/aliases/aliases-in-language-for-item.json +++ b/repo/rest-api/specs/resources/aliases/aliases-in-language-for-item.json @@ -47,6 +47,7 @@ }, "304": { "$ref": "../../global/responses.json#/NotModified" }, "400": { "$ref": "../../global/responses.json#/InvalidAddAliasesInput" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "409": { "$ref": "../../global/responses.json#/ItemRedirected" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, diff --git a/repo/rest-api/specs/resources/aliases/aliases-in-language-for-property.json b/repo/rest-api/specs/resources/aliases/aliases-in-language-for-property.json index dac513a65a..f3c7a8596e 100644 --- a/repo/rest-api/specs/resources/aliases/aliases-in-language-for-property.json +++ b/repo/rest-api/specs/resources/aliases/aliases-in-language-for-property.json @@ -46,6 +46,7 @@ }, "304": { "$ref": "../../global/responses.json#/NotModified" }, "400": { "$ref": "../../global/responses.json#/InvalidAddAliasesInput" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, "500": { "$ref": "../../global/responses.json#/UnexpectedError" } diff --git a/repo/rest-api/specs/resources/aliases/list-for-item.json b/repo/rest-api/specs/resources/aliases/list-for-item.json index 3140956fa5..030005f652 100644 --- a/repo/rest-api/specs/resources/aliases/list-for-item.json +++ b/repo/rest-api/specs/resources/aliases/list-for-item.json @@ -35,6 +35,7 @@ "responses": { "200": { "$ref": "../../global/responses.json#/ItemAliases" }, "400": { "$ref": "../../global/responses.json#/InvalidPatch" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "409": { "$ref": "../../global/responses.json#/CannotApplyItemPatch" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, diff --git a/repo/rest-api/specs/resources/aliases/list-for-property.json b/repo/rest-api/specs/resources/aliases/list-for-property.json index 6f264a421a..de9f8515c5 100644 --- a/repo/rest-api/specs/resources/aliases/list-for-property.json +++ b/repo/rest-api/specs/resources/aliases/list-for-property.json @@ -34,6 +34,7 @@ "responses": { "200": { "$ref": "../../global/responses.json#/PropertyAliases" }, "400": { "$ref": "../../global/responses.json#/InvalidPatch" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "409": { "$ref": "../../global/responses.json#/CannotApplyPropertyPatch" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, diff --git a/repo/rest-api/specs/resources/descriptions/description-in-language-for-item.json b/repo/rest-api/specs/resources/descriptions/description-in-language-for-item.json index c820b84274..6612b399e5 100644 --- a/repo/rest-api/specs/resources/descriptions/description-in-language-for-item.json +++ b/repo/rest-api/specs/resources/descriptions/description-in-language-for-item.json @@ -47,6 +47,7 @@ }, "304": { "$ref": "../../global/responses.json#/NotModified" }, "400": { "$ref": "../../global/responses.json#/InvalidSetDescriptionInput" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "409": { "$ref": "../../global/responses.json#/ItemRedirected" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, @@ -71,6 +72,7 @@ "responses": { "200": { "$ref": "../../global/responses.json#/DescriptionDeleted" }, "400": { "$ref": "../../global/responses.json#/InvalidRemoveDescriptionInput" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "409": { "$ref": "../../global/responses.json#/ItemRedirected" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, diff --git a/repo/rest-api/specs/resources/descriptions/description-in-language-for-property.json b/repo/rest-api/specs/resources/descriptions/description-in-language-for-property.json index cc170ad335..94fa02dfab 100644 --- a/repo/rest-api/specs/resources/descriptions/description-in-language-for-property.json +++ b/repo/rest-api/specs/resources/descriptions/description-in-language-for-property.json @@ -46,6 +46,7 @@ }, "304": { "$ref": "../../global/responses.json#/NotModified" }, "400": { "$ref": "../../global/responses.json#/InvalidSetDescriptionInput" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, "422": { "$ref": "../../global/responses.json#/DataPolicyViolation" }, @@ -69,6 +70,7 @@ "responses": { "200": { "$ref": "../../global/responses.json#/DescriptionDeleted" }, "400": { "$ref": "../../global/responses.json#/InvalidRemoveDescriptionInput" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, "500": { "$ref": "../../global/responses.json#/UnexpectedError" } diff --git a/repo/rest-api/specs/resources/descriptions/list-for-item.json b/repo/rest-api/specs/resources/descriptions/list-for-item.json index 4e793f85f6..2c705e2534 100644 --- a/repo/rest-api/specs/resources/descriptions/list-for-item.json +++ b/repo/rest-api/specs/resources/descriptions/list-for-item.json @@ -38,6 +38,7 @@ "responses": { "200": { "$ref": "../../global/responses.json#/ItemDescriptions" }, "400": { "$ref": "../../global/responses.json#/InvalidPatch" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "409": { "$ref": "../../global/responses.json#/CannotApplyItemPatch" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, diff --git a/repo/rest-api/specs/resources/descriptions/list-for-property.json b/repo/rest-api/specs/resources/descriptions/list-for-property.json index a486ec7bd3..9a7d3d6dcc 100644 --- a/repo/rest-api/specs/resources/descriptions/list-for-property.json +++ b/repo/rest-api/specs/resources/descriptions/list-for-property.json @@ -37,6 +37,7 @@ "responses": { "200": { "$ref": "../../global/responses.json#/PropertyDescriptions" }, "400": { "$ref": "../../global/responses.json#/InvalidPatch" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "409": { "$ref": "../../global/responses.json#/CannotApplyPropertyPatch" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, diff --git a/repo/rest-api/specs/resources/items/list.json b/repo/rest-api/specs/resources/items/list.json index 4b625f9e73..2095db5d7e 100644 --- a/repo/rest-api/specs/resources/items/list.json +++ b/repo/rest-api/specs/resources/items/list.json @@ -10,6 +10,7 @@ "responses": { "201": { "$ref": "../../global/responses.json#/Item" }, "400": { "$ref": "./responses.json#/InvalidNewItemInput" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "422": { "$ref": "../../global/responses.json#/DataPolicyViolation" }, "500": { "$ref": "../../global/responses.json#/UnexpectedError" } } diff --git a/repo/rest-api/specs/resources/items/single.json b/repo/rest-api/specs/resources/items/single.json index 6bede16780..720899d27a 100644 --- a/repo/rest-api/specs/resources/items/single.json +++ b/repo/rest-api/specs/resources/items/single.json @@ -36,6 +36,7 @@ "responses": { "200": { "$ref": "../../global/responses.json#/Item" }, "400": { "$ref": "../../global/responses.json#/InvalidPatch" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "409": { "$ref": "../../global/responses.json#/CannotApplyItemPatch" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, diff --git a/repo/rest-api/specs/resources/labels/label-in-language-for-item.json b/repo/rest-api/specs/resources/labels/label-in-language-for-item.json index 739ff5f7bf..ee8d2cf4b6 100644 --- a/repo/rest-api/specs/resources/labels/label-in-language-for-item.json +++ b/repo/rest-api/specs/resources/labels/label-in-language-for-item.json @@ -47,6 +47,7 @@ }, "304": { "$ref": "../../global/responses.json#/NotModified" }, "400": { "$ref": "../../global/responses.json#/InvalidSetLabelInput" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "409": { "$ref": "../../global/responses.json#/ItemRedirected" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, @@ -71,6 +72,7 @@ "responses": { "200": { "$ref": "../../global/responses.json#/LabelDeleted" }, "400": { "$ref": "../../global/responses.json#/InvalidRemoveLabelInput" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "409": { "$ref": "../../global/responses.json#/ItemRedirected" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, diff --git a/repo/rest-api/specs/resources/labels/label-in-language-for-property.json b/repo/rest-api/specs/resources/labels/label-in-language-for-property.json index 198b07a186..4cc53aa7c9 100644 --- a/repo/rest-api/specs/resources/labels/label-in-language-for-property.json +++ b/repo/rest-api/specs/resources/labels/label-in-language-for-property.json @@ -46,6 +46,7 @@ }, "304": { "$ref": "../../global/responses.json#/NotModified" }, "400": { "$ref": "../../global/responses.json#/InvalidSetLabelInput" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, "422": { "$ref": "../../global/responses.json#/DataPolicyViolation" }, @@ -69,6 +70,7 @@ "responses": { "200": { "$ref": "../../global/responses.json#/LabelDeleted" }, "400": { "$ref": "../../global/responses.json#/InvalidRemoveLabelInput" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, "500": { "$ref": "../../global/responses.json#/UnexpectedError" } diff --git a/repo/rest-api/specs/resources/labels/list-for-item.json b/repo/rest-api/specs/resources/labels/list-for-item.json index a891d5c319..0ec345a029 100644 --- a/repo/rest-api/specs/resources/labels/list-for-item.json +++ b/repo/rest-api/specs/resources/labels/list-for-item.json @@ -35,6 +35,7 @@ "responses": { "200": { "$ref": "../../global/responses.json#/ItemLabels" }, "400": { "$ref": "../../global/responses.json#/InvalidPatch" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "409": { "$ref": "../../global/responses.json#/CannotApplyItemPatch" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, diff --git a/repo/rest-api/specs/resources/labels/list-for-property.json b/repo/rest-api/specs/resources/labels/list-for-property.json index ae016eab9d..477501e28a 100644 --- a/repo/rest-api/specs/resources/labels/list-for-property.json +++ b/repo/rest-api/specs/resources/labels/list-for-property.json @@ -34,6 +34,7 @@ "responses": { "200": { "$ref": "../../global/responses.json#/PropertyLabels" }, "400": { "$ref": "../../global/responses.json#/InvalidPatch" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "409": { "$ref": "../../global/responses.json#/CannotApplyPropertyPatch" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, diff --git a/repo/rest-api/specs/resources/properties/single.json b/repo/rest-api/specs/resources/properties/single.json index 774fbb5497..fc6d657aa2 100644 --- a/repo/rest-api/specs/resources/properties/single.json +++ b/repo/rest-api/specs/resources/properties/single.json @@ -33,6 +33,7 @@ "responses": { "200": { "$ref": "../../global/responses.json#/Property" }, "400": { "$ref": "../../global/responses.json#/InvalidPatch" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "409": { "$ref": "../../global/responses.json#/CannotApplyPropertyPatch" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, diff --git a/repo/rest-api/specs/resources/sitelinks/list.json b/repo/rest-api/specs/resources/sitelinks/list.json index b1226c3f69..2e0944e571 100644 --- a/repo/rest-api/specs/resources/sitelinks/list.json +++ b/repo/rest-api/specs/resources/sitelinks/list.json @@ -35,6 +35,7 @@ "responses": { "200": { "$ref": "../../global/responses.json#/Sitelinks" }, "400": { "$ref": "../../global/responses.json#/InvalidPatch" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "409": { "$ref": "../../global/responses.json#/CannotApplyItemPatch" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, diff --git a/repo/rest-api/specs/resources/sitelinks/single.json b/repo/rest-api/specs/resources/sitelinks/single.json index feebb2416b..fc5573a9a0 100644 --- a/repo/rest-api/specs/resources/sitelinks/single.json +++ b/repo/rest-api/specs/resources/sitelinks/single.json @@ -46,6 +46,7 @@ "description": "The newly added Sitelink" }, "400": { "$ref": "./responses.json#/InvalidSetSitelinkInput" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "409": { "$ref": "../../global/responses.json#/ItemRedirected" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, @@ -70,6 +71,7 @@ "responses": { "200": { "$ref": "./responses.json#/SitelinkDeleted" }, "400": { "$ref": "./responses.json#/InvalidRemoveSitelinkInput" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "409": { "$ref": "../../global/responses.json#/ItemRedirected" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, diff --git a/repo/rest-api/specs/resources/statements/list-for-item.json b/repo/rest-api/specs/resources/statements/list-for-item.json index 4b4ddfe720..9f57ad0781 100644 --- a/repo/rest-api/specs/resources/statements/list-for-item.json +++ b/repo/rest-api/specs/resources/statements/list-for-item.json @@ -36,6 +36,7 @@ "responses": { "201": { "$ref": "./responses.json#/ItemStatementCreated" }, "400": { "$ref": "../../global/responses.json#/InvalidNewStatementInput" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "409": { "$ref": "../../global/responses.json#/ItemRedirected" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, diff --git a/repo/rest-api/specs/resources/statements/list-for-property.json b/repo/rest-api/specs/resources/statements/list-for-property.json index 00a511088d..7adb6f82ce 100644 --- a/repo/rest-api/specs/resources/statements/list-for-property.json +++ b/repo/rest-api/specs/resources/statements/list-for-property.json @@ -35,6 +35,7 @@ "responses": { "201": { "$ref": "./responses.json#/PropertyStatementCreated" }, "400": { "$ref": "../../global/responses.json#/InvalidNewStatementInput" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, "500": { "$ref": "../../global/responses.json#/UnexpectedError" } diff --git a/repo/rest-api/specs/resources/statements/single-for-item.json b/repo/rest-api/specs/resources/statements/single-for-item.json index f3469e6383..20cb4e8de0 100644 --- a/repo/rest-api/specs/resources/statements/single-for-item.json +++ b/repo/rest-api/specs/resources/statements/single-for-item.json @@ -38,6 +38,7 @@ "responses": { "200": { "$ref": "../../global/responses.json#/ItemStatement" }, "400": { "$ref": "./responses.json#/InvalidReplaceItemStatementInput" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, "500": { "$ref": "../../global/responses.json#/UnexpectedError" } @@ -59,6 +60,7 @@ "responses": { "200": { "$ref": "../../global/responses.json#/ItemStatement" }, "400": { "$ref": "./responses.json#/InvalidItemStatementPatch" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "409": { "$ref": "../../global/responses.json#/CannotApplyStatementPatch" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, @@ -82,6 +84,7 @@ "responses": { "200": { "$ref": "../../global/responses.json#/StatementDeleted" }, "400": { "$ref": "./responses.json#/InvalidRemoveItemStatementInput" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, "500": { "$ref": "../../global/responses.json#/UnexpectedError" } diff --git a/repo/rest-api/specs/resources/statements/single-for-property.json b/repo/rest-api/specs/resources/statements/single-for-property.json index 4d6d0eac37..c4df8f1b39 100644 --- a/repo/rest-api/specs/resources/statements/single-for-property.json +++ b/repo/rest-api/specs/resources/statements/single-for-property.json @@ -38,6 +38,7 @@ "responses": { "200": { "$ref": "../../global/responses.json#/PropertyStatement" }, "400": { "$ref": "./responses.json#/InvalidReplacePropertyStatementInput" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, "500": { "$ref": "../../global/responses.json#/UnexpectedError" } @@ -59,6 +60,7 @@ "responses": { "200": { "$ref": "../../global/responses.json#/PropertyStatement" }, "400": { "$ref": "./responses.json#/InvalidPropertyStatementPatch" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "409": { "$ref": "../../global/responses.json#/CannotApplyStatementPatch" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, @@ -82,6 +84,7 @@ "responses": { "200": { "$ref": "../../global/responses.json#/StatementDeleted" }, "400": { "$ref": "./responses.json#/InvalidRemovePropertyStatementInput" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, "500": { "$ref": "../../global/responses.json#/UnexpectedError" } diff --git a/repo/rest-api/specs/resources/statements/single.json b/repo/rest-api/specs/resources/statements/single.json index 765f04b4cd..e30c9b073a 100644 --- a/repo/rest-api/specs/resources/statements/single.json +++ b/repo/rest-api/specs/resources/statements/single.json @@ -36,6 +36,7 @@ "responses": { "200": { "$ref": "../../global/responses.json#/Statement" }, "400": { "$ref": "./responses.json#/InvalidReplaceStatementInput" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, "500": { "$ref": "../../global/responses.json#/UnexpectedError" } @@ -56,6 +57,7 @@ "responses": { "200": { "$ref": "../../global/responses.json#/Statement" }, "400": { "$ref": "../../global/responses.json#/InvalidPatch" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "409": { "$ref": "../../global/responses.json#/CannotApplyStatementPatch" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, @@ -78,6 +80,7 @@ "responses": { "200": { "$ref": "../../global/responses.json#/StatementDeleted" }, "400": { "$ref": "./responses.json#/InvalidRemoveStatementInput" }, + "403": { "$ref": "../../global/responses.json#/PermissionDenied" }, "404": { "$ref": "../../global/responses.json#/ResourceNotFound" }, "412": { "$ref": "../../global/responses.json#/PreconditionFailedError" }, "500": { "$ref": "../../global/responses.json#/UnexpectedError" } diff --git a/repo/rest-api/src/RouteHandlers/openapi.json b/repo/rest-api/src/RouteHandlers/openapi.json index 145730c8fa..608b69916a 100644 --- a/repo/rest-api/src/RouteHandlers/openapi.json +++ b/repo/rest-api/src/RouteHandlers/openapi.json @@ -131,6 +131,9 @@ } } }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "422": { "$ref": "#/components/responses/DataPolicyViolation" }, @@ -247,6 +250,9 @@ "400": { "$ref": "#/components/responses/InvalidPatch" }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -346,6 +352,9 @@ "400": { "$ref": "#/components/responses/InvalidPatch" }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -552,6 +561,9 @@ } } }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -650,6 +662,9 @@ } } }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -763,6 +778,9 @@ "400": { "$ref": "#/components/responses/InvalidPatch" }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -863,6 +881,9 @@ "400": { "$ref": "#/components/responses/InvalidPatch" }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -960,6 +981,9 @@ "400": { "$ref": "#/components/responses/InvalidPatch" }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -1079,6 +1103,9 @@ "400": { "$ref": "#/components/responses/InvalidSetDescriptionInput" }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -1135,6 +1162,9 @@ "400": { "$ref": "#/components/responses/InvalidRemoveDescriptionInput" }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -1248,6 +1278,9 @@ "400": { "$ref": "#/components/responses/InvalidSetDescriptionInput" }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -1301,6 +1334,9 @@ "400": { "$ref": "#/components/responses/InvalidRemoveDescriptionInput" }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -1497,6 +1533,9 @@ "400": { "$ref": "#/components/responses/InvalidNewStatementInput" }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -1662,6 +1701,9 @@ } } }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -1742,6 +1784,9 @@ } } }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -1822,6 +1867,9 @@ } } }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -1915,6 +1963,9 @@ "400": { "$ref": "#/components/responses/InvalidPatch" }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -2011,6 +2062,9 @@ "400": { "$ref": "#/components/responses/InvalidPatch" }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -2130,6 +2184,9 @@ "400": { "$ref": "#/components/responses/InvalidSetLabelInput" }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -2186,6 +2243,9 @@ "400": { "$ref": "#/components/responses/InvalidRemoveLabelInput" }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -2299,6 +2359,9 @@ "400": { "$ref": "#/components/responses/InvalidSetLabelInput" }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -2352,6 +2415,9 @@ "400": { "$ref": "#/components/responses/InvalidRemoveLabelInput" }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -2445,6 +2511,9 @@ "400": { "$ref": "#/components/responses/InvalidPatch" }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -2541,6 +2610,9 @@ "400": { "$ref": "#/components/responses/InvalidPatch" }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -2660,6 +2732,9 @@ "400": { "$ref": "#/components/responses/InvalidAddAliasesInput" }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -2773,6 +2848,9 @@ "400": { "$ref": "#/components/responses/InvalidAddAliasesInput" }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -2969,6 +3047,9 @@ "400": { "$ref": "#/components/responses/InvalidNewStatementInput" }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -3131,6 +3212,9 @@ } } }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -3211,6 +3295,9 @@ } } }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -3291,6 +3378,9 @@ } } }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -3441,6 +3531,9 @@ } } }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -3483,6 +3576,9 @@ "400": { "$ref": "#/components/responses/InvalidPatch" }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -3557,6 +3653,9 @@ } } }, + "403": { + "$ref": "#/components/responses/PermissionDenied" + }, "404": { "$ref": "#/components/responses/ResourceNotFound" }, @@ -4543,6 +4642,29 @@ } } }, + "PermissionDenied": { + "description": "The access to resource was denied", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/responses/InvalidPatch/content/application~1json/schema" + }, + "examples": { + "permission-denied": { + "$ref": "#/components/examples/PermissionDeniedExample" + } + } + } + }, + "headers": { + "Content-Language": { + "schema": { + "type": "string" + }, + "description": "Language code of the language in which error message is provided" + } + } + }, "ResourceNotFound": { "description": "The specified resource was not found", "content": { @@ -6540,6 +6662,16 @@ "statement_property_id": "{property_id_value}" } } + }, + "PermissionDeniedExample": { + "value": { + "code": "permission-denied", + "message": "Access to resource is denied", + "context": { + "denial_reason": "{reason_code}", + "denial_context": "{additional_context}" + } + } } } },