Skip to content

Commit

Permalink
feat: add conflict error to error definition (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
adriantam authored Dec 12, 2023
1 parent d2c535d commit 061d8d8
Show file tree
Hide file tree
Showing 6 changed files with 475 additions and 162 deletions.
113 changes: 112 additions & 1 deletion docs/openapiv2/apidocs.swagger.json

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

6 changes: 6 additions & 0 deletions openfga/v1/errors_ignore.proto
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,10 @@ message PathUnknownErrorMessageResponse {
string message = 2;
}

message AbortedMessageResponse {
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {example: "{\"code\":\"10\", \"message\":\"transaction conflict\"}"};
string code = 1;
string message = 2;
}

message ErrorMessageRequest {}
9 changes: 9 additions & 0 deletions openfga/v1/openapi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
}
}
}
responses: {
key: "409"
value: {
description: "Request was aborted due a transaction conflict."
schema: {
json_schema: {ref: ".openfga.v1.AbortedMessageResponse"}
}
}
}
responses: {
key: "500"
value: {
Expand Down
Loading

0 comments on commit 061d8d8

Please sign in to comment.