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

[v6] include optional parameters with no media type in mediatype-specific options bag #626

Merged
merged 2 commits into from
Apr 24, 2020

Conversation

chradek
Copy link
Contributor

@chradek chradek commented Apr 24, 2020

@bterlson found an issue where optional parameters were being ignored when an operation supports multiple media types.

It turns out our code that generated the mediatype-specific options bags checked if a parameter's mediatype matched the overload's mediatype. This meant we were excluding optional parameters that applied to all overloads.

I added an Open API V3 model to generate a client that exercises these conditions. I'm not sure if it's possible to encounter this with an Open API V2 (swagger) file given how you specify multiple content-types there.

Copy link
Member

@joheredi joheredi left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for adding the test client 😄

@chradek chradek merged commit adaeddd into Azure:v6 Apr 24, 2020
@chradek chradek deleted the fix-optional-params-overloads branch April 24, 2020 22:53
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.

2 participants