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

Fix parameter's default value #1033

Closed
wing328 opened this issue Sep 13, 2018 · 0 comments · Fixed by #1045
Closed

Fix parameter's default value #1033

wing328 opened this issue Sep 13, 2018 · 0 comments · Fixed by #1045
Assignees
Milestone

Comments

@wing328
Copy link
Member

wing328 commented Sep 13, 2018

Description

Currently the parameter's default value is obtained via the following code

            if (parameterSchema.getDefault() != null) {
                codegenParameter.defaultValue = toDefaultValue(parameterSchema);
            }

We need to revise it to skip the null check in the default codegen and let the generator to handle it (with null value) instead.

We will need to revise all generators as the change impacts default codegen.

openapi-generator version

Latest master

Related issues/PRs

#1027
#761

Suggest a fix/enhancement

I'm working on a fix, which is due by coming Sunday.

@wing328 wing328 self-assigned this Sep 13, 2018
@wing328 wing328 added this to the 3.3.0 milestone Sep 13, 2018
@wing328 wing328 modified the milestones: 3.3.0, 3.3.1 Oct 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant