-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support google.api.http annotation (#83)
* x-goog-request * add header-params filed in method * update baseline * baseline update * add logic for routing header * feedback * params use snake case instead of camel case * regex match, take 2 element * lint * move init request method in test to util as a macro * feedback
- Loading branch information
1 parent
105ecd1
commit 712516f
Showing
16 changed files
with
666 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{%- macro initRequestWithHeaderParam(method) -%} | ||
const request: protosTypes{{ method.inputInterface }} = {}; | ||
{%- if method.headerRequestParams.length > 1 %} | ||
{%- set chain = "request" -%} | ||
{%- for field in method.headerRequestParams.slice(0, -1) %} | ||
{{ chain }}.{{ field.toCamelCase() }} = {}; | ||
{%- set chain = chain + "." + field.toCamelCase() -%} | ||
{%- endfor %} | ||
{{ chain }}.{{ method.headerRequestParams.slice(-1)[0] }} = ''; | ||
{%- endif %} | ||
{%- endmacro -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.