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

Fixes #722 #723

Merged
merged 2 commits into from
Jul 19, 2020
Merged

Fixes #722 #723

merged 2 commits into from
Jul 19, 2020

Conversation

UnHumbleBen
Copy link
Contributor

@UnHumbleBen UnHumbleBen commented Jul 9, 2020

This commit seems to forgotten to add formParams for addCodegenContentParameters function

This commit: swagger-api@3ac195e#diff-371437d4e9e09ea18f2ff29dbacd0e84R4315 seems to forgotten to add formParams for `addCodegenContentParameters` function
@HugoMario
Copy link
Contributor

hey @UnHumbleBen thanks for your PR, this is something interesting to discuss. Maybe the method needs more refactor. I think form parameters and and body parameters are excluding each others according to :
https://github.com/swagger-api/swagger-codegen-generators/blob/master/src/main/java/io/swagger/codegen/v3/generators/DefaultCodegenConfig.java#L2149-L2191

So based on that:
addParameters(content, codegenOperation.bodyParams);
and
addParameters(content, codegenOperation.formParams);

should be called sequentially?

@UnHumbleBen
Copy link
Contributor Author

Can you explain more on what the issue is? My understanding is that if there are no bodyParams, then addParameters(content, codegenOperation.bodyParams); does nothing. If there are no formParams, addParameters(content, codegenOperation.formParams); does nothing.

@HugoMario
Copy link
Contributor

yea, you're right, that's what we expect.

@HugoMario HugoMario merged commit 50e6795 into swagger-api:master Jul 19, 2020
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