-
Notifications
You must be signed in to change notification settings - Fork 50
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 dynamic routing header generation #887
Conversation
Great great start to this Alice! This is a tough feature and you are integrating it marvelously. |
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.
Great adjustments.
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.
This is looking really good!
b16ae4c
to
47f9292
Compare
47f9292
to
dcd0642
Compare
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.
Way to go, Alice, well done.
got = strings.Split(got[0], "&") | ||
sort.Strings(got) | ||
sort.Strings(tst.want) | ||
if !reflect.DeepEqual(got, tst.want) { |
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.
Nit: use cmp.Diff (look around the codebase for uses) to compare to values in a test. This can be done in another PR though.
Add support for the google.api.routing annotation. In short, this annotation allows API producers to explicitly define those request fields should be include in request headers/metadata. Furthermore, it enables API producers to define simple segment matchers (primarily for resource name values) that are generated into regular expressions in the client that extract segments of a field's value to be sent in the header. Finally, it enables API producers to specify a key other than the field name to use in the header key-value-pair. In relation to the implicit headers (extraced from google.api.http annotations), the google.api.routing annotation takes precedence. Please read the annotation documentation for more information on the annotation resolution logic.
gapic-showcase
integration test