-
Notifications
You must be signed in to change notification settings - Fork 66
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
feat: add rest transport generation for clients with optional flag #688
Changes from 1 commit
c1a6f89
bd7c32d
cd3a7f1
b41db31
ce69e7d
89fa08b
86f3a9c
234cc09
35ac276
c8155a5
55a815c
ac0bdef
e79e8c7
824ad11
2d11e19
b5c6d06
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -742,13 +742,14 @@ def field_headers(self) -> Sequence[str]: | |
def http_opt(self) -> Dict[str, str]: | ||
"""Return the http option for this method.""" | ||
yon-mg marked this conversation as resolved.
Show resolved
Hide resolved
|
||
http = self.options.Extensions[annotations_pb2.http].ListFields() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do think a type declaration or a comment saying this is a |
||
answer: Dict[str, str] = None | ||
software-dov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
if len(http) < 1: | ||
return None | ||
return answer | ||
|
||
http_method = http[0] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Based on our offline discussion, I suggest s/ |
||
answer: Dict[str, str] = { | ||
'method':http_method[0].name, | ||
'url':http_method[1], | ||
answer = { | ||
'method': http_method[0].name, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Based on our offline discussion, let's s/ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this be madness, there be method to it! 💀 |
||
'url': http_method[1], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider having "template" in the name: maybe |
||
} | ||
if len(http) > 1: | ||
http_opt = http[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.
Can you put parentheses around this chunk, just to make it clear that it's a cohesive unit?