feat(rust): add support for deep object query parameters #11766
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.
Description
Refs: Related to PHP implementation in #11765
Adds deep object query parameter encoding support to the Rust SDK generator. This enables nested objects to be serialized using bracket notation (e.g.,
filter[name]=john&filter[age]=30) following the OpenAPI 3.0 deepObject serialization style.Link to Devin run: https://app.devin.ai/sessions/64b3914c128f4cfa957eaab189b9c426
Requested by: @iamnamananand996
Changes Made
serialize_deep_object<T>method toQueryBuilderfor encoding nested objects with bracket notationserialize_deep_object_array<T>method for handling arrays of nested objectsflatten_json_valuehelper function that recursively flattens JSON values into query parameter formatjson_value_to_stringhelper for converting JSON primitives to stringsTesting
Human Review Checklist
flatten_json_valuecorrectly handles recursive object/array structures