Skip to content

Add validate --recommend option to maven and gradle plugin options. #335

Closed
@jimschubert

Description

@jimschubert
Description

In #292, I implemented a --recommend option for the CLI's validate command. We'll want to add a similar option to the Maven and Gradle plugins.

I'm thinking that we could create a validator result object (e.g. ValidationSummary, with properties exposing a set of errors and a set of warnings) and a validator utility (e.g. SpecificationValidator), in which we encapsulate the logic for returning errors/warnings. The CLI command (and probably Maven and Gradle plugins) output a stringified result of errors and warnings, which would be a static utility method on the validator utility type. This would remove any inconsistencies between the tools and would allow other tools (like my IntelliJ plugin) consider "errors" the same as we consider them in openapi-generator; right now it's the same as swagger-parser, but this may not always be the case.

openapi-generator version

3.0.2+

Related issues/PRs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions