-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
openapi からprotoに変更 #10
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ざっくりみた
Makefile
Outdated
@@ -4,6 +4,7 @@ PROTO_FILES = $(shell find ./proto/schema -name "*.proto" -type f) | |||
build: | |||
rm -rf openapi | |||
mkdir openapi | |||
protoc -I. --plugin=./protoc-plugin/protoc-gen-ts-msw-handlers/protoc-gen-ts-msw-handlers --ts-msw-handlers_out=./msw ./proto/schema/**/*.proto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
各コマンドを.PHONY
に書いた方がよき
msw/types/index.ts
Outdated
} | ||
export type GetUserWorksRequest = { | ||
userId: string; | ||
vislibility: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
visibility
?
export type GetUserWorksRequest = { | ||
userId: string; | ||
vislibility: string; | ||
newestUserId: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newestよりlatestの方が自然ではある(けど多分ここですべきレビューではない)
|
||
option go_package = "./"; | ||
enum AssetType { | ||
zip = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
protoでは0に意味のある値を持たせないことが多いから0はUNKNOWN
くらいにしておくのが一般的
} | ||
|
||
message DeleteAssetResponse { | ||
string status =1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string status =1; | |
string status = 1; |
リンターがうまく働いてない?
|
||
message GetUserWorksRequest{ | ||
string user_id = 1; | ||
string vislibility = 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
visibility
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
実装内容
全APIをprotoに変更
protoc pluginによるmsw handlerの生成