-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Conform to expected wire format for struct query parameters. #2892
Conform to expected wire format for struct query parameters. #2892
Conversation
@@ -1188,13 +1196,17 @@ def test_from_api_repr_w_name(self): | |||
def test_from_api_repr_wo_name(self): | |||
RESOURCE = { | |||
'parameterType': { | |||
'type': 'STRUTCT', |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
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.
I defer to @tswast on the correctness of this
@@ -554,10 +555,12 @@ def from_api_repr(cls, resource): | |||
instance = cls(name) | |||
types = instance.struct_types | |||
for item in resource['parameterType']['structTypes']: | |||
types[item['name']] = item['type'] | |||
types[item['name']] = item['type']['type'] |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -568,18 +571,19 @@ def to_api_repr(self): | |||
:returns: JSON mapping | |||
""" | |||
types = [ | |||
{'name': key, 'type': value} | |||
{'name': key, 'type': {'type': value}} |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
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.
Thanks!
@@ -554,10 +555,12 @@ def from_api_repr(cls, resource): | |||
instance = cls(name) | |||
types = instance.struct_types | |||
for item in resource['parameterType']['structTypes']: | |||
types[item['name']] = item['type'] | |||
types[item['name']] = item['type']['type'] |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -554,10 +555,12 @@ def from_api_repr(cls, resource): | |||
instance = cls(name) | |||
types = instance.struct_types | |||
for item in resource['parameterType']['structTypes']: | |||
types[item['name']] = item['type'] | |||
types[item['name']] = item['type']['type'] |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
…query-parm Conform to expected wire format for struct query parameters.
Closes: #2887.
/cc @tswast