This repository has been archived by the owner on Sep 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(httpjson): handle message derived query params (#1784)
* fix(httpjson): handle message derived query params Fixes #1783 Some message derived types such as Duration, FieldMask or Int32Value would not be correctly handled by String.valueOf(). Instead, the toJson() method is used to make it compliant with the protobuf languague guide * fix(protoparser): decompose messages in query prms Some message type objects will be passed as query params. These may have nested properties that will now be generated as ?&foo.bar=1&foo.baz=2 * test(serializer): add test for complex msg obj * fix(format): format ProtoRestSerializer files * fix(queryparam): use json approach to process msgs also fixed best practice issues pointed out in last commit's PR * fix(queryparam): use numeric value for root enums enums passed as root object to putQueryParam will now be serialized as their numeric value * chore: Refactoring the fix. * test(queryparam): atomized tests Also added tests for serializing objects that contain Any typed messages. Note that the type registry must have the tested types beforehand, so they were added in the test class setup * test(queryparam): test objects w/ well-known types Co-authored-by: Blake Li <[email protected]>
- Loading branch information
1 parent
9cc2ccc
commit 4524fad
Showing
2 changed files
with
133 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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