Skip to content

Commit

Permalink
Branch protection status code should be 403 (#5273)
Browse files Browse the repository at this point in the history
* Branch protection status code should be 403

* apply code review changes

* fix indent

* fix dup Forbidden message type
  • Loading branch information
nopcoder authored Feb 23, 2023
1 parent 5371adb commit 1c8481a
Show file tree
Hide file tree
Showing 21 changed files with 145 additions and 32 deletions.
24 changes: 18 additions & 6 deletions api/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,6 @@ components:
application/json:
schema:
$ref: "#/components/schemas/Error"
Forbidden:
description: Access is forbidden
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
NotFound:
description: Resource Not Found
content:
Expand All @@ -103,6 +97,12 @@ components:
application/json:
schema:
$ref: "#/components/schemas/Error"
Forbidden:
description: Forbidden
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
ValidationError:
description: Validation Error
content:
Expand Down Expand Up @@ -2592,6 +2592,8 @@ paths:
$ref: "#/components/responses/ValidationError"
401:
$ref: "#/components/responses/Unauthorized"
403:
$ref: "#/components/responses/Forbidden"
404:
$ref: "#/components/responses/NotFound"
default:
Expand Down Expand Up @@ -2643,6 +2645,8 @@ paths:
description: branch deleted successfully
401:
$ref: "#/components/responses/Unauthorized"
403:
$ref: "#/components/responses/Forbidden"
404:
$ref: "#/components/responses/NotFound"
default:
Expand Down Expand Up @@ -2749,6 +2753,8 @@ paths:
$ref: "#/components/responses/ValidationError"
401:
$ref: "#/components/responses/Unauthorized"
403:
$ref: "#/components/responses/Forbidden"
404:
$ref: "#/components/responses/NotFound"
409:
Expand Down Expand Up @@ -3286,6 +3292,8 @@ paths:
$ref: "#/components/responses/ValidationError"
401:
$ref: "#/components/responses/Unauthorized"
403:
$ref: "#/components/responses/Forbidden"
404:
$ref: "#/components/responses/NotFound"
412:
Expand All @@ -3302,6 +3310,8 @@ paths:
description: object deleted successfully
401:
$ref: "#/components/responses/Unauthorized"
403:
$ref: "#/components/responses/Forbidden"
404:
$ref: "#/components/responses/NotFound"
default:
Expand Down Expand Up @@ -3339,6 +3349,8 @@ paths:
$ref: "#/components/schemas/ObjectErrorList"
401:
$ref: "#/components/responses/Unauthorized"
403:
$ref: "#/components/responses/Forbidden"
404:
$ref: "#/components/responses/NotFound"
default:
Expand Down
50 changes: 43 additions & 7 deletions clients/java/api/openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions clients/java/docs/BranchesApi.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions clients/java/docs/CommitsApi.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion clients/java/docs/ImportApi.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions clients/java/docs/ObjectsApi.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions clients/java/docs/RefsApi.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1c8481a

Please sign in to comment.