Uh oh!
There was an error while loading. Please reload this page.
This repository was archived by the owner on Mar 20, 2018. It is now read-only.
Add metadata_overlay - #203
Closed
evaogbe wants to merge 1 commit into
Closed
Conversation
theacodes
commented
Oct 24, 2017
Hey @eoogbe, should this be done against api_core instead? (we're about to drop gax) |
evaogbe
commented
Oct 24, 2017
ContributorAuthor
@jonparrott When you say "about to", how soon do you mean? Routing headers are pretty critical path. |
theacodes
commented
Oct 24, 2017
@lukesneeringer and @landrito can speak to that. |
theacodes
commented
Oct 25, 2017
@eoogbe I also thought about this a while and I can't see why we need this. Metadata can already be specified by gapic clients in the generated method. For example, we could update this generated code: defcreate_book(self, name, read=False, ...):
request=book_pb2.Book(
name=name,
read=read,
)
returnself._create_book(request, ...)to just this: defcreate_book(self, name, read=False, ...):
request=book_pb2.Book(
name=name,
read=read,
)
metadata= [
('x-google-request-params',
'name={}&book.read={}'.format(request.name, request.read)),
]
returnself._create_book(
request, metadata=metadata, ...)Therefore obviating the need for this complex "overlay" logic. Am I missing something? |
evaogbe
commented
Oct 25, 2017
ContributorAuthor
@jonparrott Fair enough |
theacodes
commented
Oct 25, 2017
Cool - glad we could figure out a simpler solution. :) |
This file contains hidden or 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
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To be used in the routing header like this: