Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #1033
Closed
Open
Issue created Sep 13, 2018 by William Cheng@wing328Contributor

Fix parameter's default value

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

https://github.com/OpenAPITools/openapi-generator/pull/1027 #761

Suggest a fix/enhancement

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

Assignee
Assign to
Time tracking