Skip to content
GitLab
    • Explore Projects Groups Snippets
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
  • Merge requests
  • !251

Validate spec on generation by default

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Jim Schubert requested to merge github/fork/jimschubert/generator-validation-option into master 7 years ago
  • Overview 0
  • Commits 10
  • Pipelines 0
  • Changes 17

Adds a validation parameter to CodegenConfigurator, and passes through options from CLI, Maven Plugin and Gradle Plugin to that property.

Default is to validate the spec during generation. If spec has errors, we will output errors as well as warnings to the user.

Option can be disabled by passing false to skipValidateSpec (Maven/Gradle) or --skip-validate-spec (CLI).

This was brought up in #208 (closed). We want to validate the spec on generation to prevent OpenAPI Spec 3.x options from creeping into OpenAPI Spec 2.0 support. I would also consider this a bug fix, because as a user I would be surprised to find that generation succeeds when my spec is invalid by default.

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • Filed the PR against the correct branch: Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Activity

Please register or sign in to reply

There are currently no pipelines.

To run a merge request pipeline, the jobs in the CI/CD configuration file must be configured to run in merge request pipelines.

0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
3
Breaking change (with fallback) Enhancement: General Issue: Bug
3
Breaking change (with fallback) Enhancement: General Issue: Bug
    Assign labels
  • Manage project labels

Milestone
3.2.0
3.2.0 (expired)
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
1
1 participant
Jim Schubert
Reference: OpenAPITools/openapi-generator!251
Source branch: github/fork/jimschubert/generator-validation-option

Menu

Explore Projects Groups Snippets