Skip to content
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

fix(rest): properly handle string-encoded well-known types in URLs #1282

Merged
merged 4 commits into from
Mar 27, 2023

Conversation

vchudnov-g
Copy link
Contributor

Well-known type messages that JSON-encode to strings appear in URL paths and query params unquoted. When we extract them from these places, we need to quote them to make them valid JSON that we can pass to the JSON deserializer. We weren't doing the quoting previously.

Fixes #1263

@vchudnov-g vchudnov-g requested a review from noahdietz March 24, 2023 20:15
@vchudnov-g vchudnov-g requested a review from a team as a code owner March 24, 2023 20:15
@vchudnov-g vchudnov-g force-pushed the field-mask-query-param branch from af3dea8 to f1c0bee Compare March 24, 2023 20:16
Copy link
Collaborator

@noahdietz noahdietz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question, but otherwise, makes sense. Thank you

util/genrest/resttools/populatefield.go Outdated Show resolved Hide resolved
@vchudnov-g vchudnov-g merged commit 579fe72 into googleapis:main Mar 27, 2023
gcf-merge-on-green bot pushed a commit that referenced this pull request Mar 28, 2023
@noahdietz
Copy link
Collaborator

@noahdietz
Copy link
Collaborator

We probably need to test if it is already "quoted" before quoting it again via %q

@noahdietz
Copy link
Collaborator

#1294 should do it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HttpJson UpdateUserRequest's FieldMask is unable to be Unmarshalled
2 participants