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

[core-http] Do not serialize empty multi collection param #12090

Merged
merged 2 commits into from Nov 2, 2020
Merged

[core-http] Do not serialize empty multi collection param #12090

merged 2 commits into from Nov 2, 2020

Conversation

joheredi
Copy link
Member

When serializing multi format query parameters, if the collection is empty we should omit the query parameter.

For context, a collection with multi format would be serialized as

Collection: [1,2,3]
Serialized Url: http://example.com?q=1&q=2&q2

So when the collection is empty: []
We should skip the parameter otherwise the service would interpret it as a collection with a null element i.e. [nul]

For an empty collection: []

Current behavior
http://example.com?q=

Expected
http://example.com

Copy link
Member

@xirzec xirzec left a comment

Choose a reason for hiding this comment

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

Nice job!

@joheredi joheredi merged commit dea54eb into Azure:master Nov 2, 2020
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-js that referenced this pull request Dec 23, 2020
Add autorest.az configurations for azure monitor control service (Azure#12090)

* add AMCS config for codegen

* reorganize command group

* rename command group

* Codegen modify try to rename DataCollectionRules create parameters

* hide DataCollectionRules Create & Update commands and DataCollectionRuleAssociations Create command

* use alias instand of rename in code-gen

* use monitor-control-service as the extension name

* Update readme.python.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants