Skip to content

Commit

Permalink
fix: remove grpc only methods from rest.py (#1440)
Browse files Browse the repository at this point in the history
  • Loading branch information
parthea authored Sep 9, 2022
1 parent 9e9971f commit c12a1c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class {{ service.name }}RestInterceptor:


"""
{% for method in service.methods.values()|sort(attribute="name") if not method.client_streaming %}
{% for method in service.methods.values()|sort(attribute="name") if not method.client_streaming and method.http_options %}
def pre_{{ method.name|snake_case }}(self, request: {{method.input.ident}}, metadata: Sequence[Tuple[str, str]]) -> Tuple[{{method.input.ident}}, Sequence[Tuple[str, str]]]:
"""Pre-rpc interceptor for {{ method.name|snake_case }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class {{ service.name }}RestInterceptor:


"""
{% for method in service.methods.values()|sort(attribute="name") if not method.client_streaming %}
{% for method in service.methods.values()|sort(attribute="name") if not method.client_streaming and method.http_options %}
def pre_{{ method.name|snake_case }}(self, request: {{method.input.ident}}, metadata: Sequence[Tuple[str, str]]) -> Tuple[{{method.input.ident}}, Sequence[Tuple[str, str]]]:
"""Pre-rpc interceptor for {{ method.name|snake_case }}

Expand Down

0 comments on commit c12a1c2

Please sign in to comment.