openapi-toolkit:lint

Full name:

net.mwalser:openapi-toolkit-maven-plugin:0.2.0:lint

Description:

Lints API descriptions (redocly lint). Fails the build on problems with severity error; see failOnErrors and failOnWarnings.

Attributes:

  • Requires a Maven project to be executed.
  • The goal is thread-safe and supports parallel builds.
  • Binds by default to the lifecycle phase: validate.

Optional Parameters

Name Type Since Description
<apis> List<String> - The API descriptions to process: aliases from the apis section of the configuration file, paths relative to the project base directory, or URLs. Empty: every API in the configuration file. Without a configuration file, paths or URLs are required and Redocly's built-in recommended ruleset applies.
User Property: openapi.toolkit.apis
<configFile> File - The Redocly configuration file. Unset: redocly.yaml in the project base directory if it exists, otherwise no configuration file.
User Property: openapi.toolkit.configFile
<extendsRulesets> List<String> - Replaces the extends list of the configuration. Built-in rulesets: minimal, recommended, recommended-strict, spec.
User Property: openapi.toolkit.extends
Alias: extends
<failOnErrors> boolean - Fail the build when problems with severity error are found.
Default: true
User Property: openapi.toolkit.lint.failOnErrors
<failOnWarnings> boolean - Fail the build when problems with severity warn are found.
Default: false
User Property: openapi.toolkit.lint.failOnWarnings
<format> String - Format of the problems in the build log: stylish, codeframe, summary, markdown or github-actions (workflow annotations, printed without the Maven prefix). For machine-readable formats use reportFile.
Default: stylish
User Property: openapi.toolkit.lint.format
<generateIgnoreFile> boolean - Write every problem found to .redocly.lint-ignore.yaml next to the configuration file (or in the project base directory without one) instead of reporting it; later runs ignore those problems (redocly lint --generate-ignore-file). Does not fail the build.
Default: false
User Property: openapi.toolkit.lint.generateIgnoreFile
<lintConfig> String - Severity of problems in the configuration file, which is linted before the goal runs: warn (reported, invalid entries are ignored), error (fails the build) or off.
Default: warn
User Property: openapi.toolkit.lintConfig
<maxProblems> int - Maximum number of problems printed to the build log, per API description and for the configuration file. Report files are not limited.
Default: 100
User Property: openapi.toolkit.maxProblems
<reportFile> File - File to write all problems to, in reportFormat; not limited by maxProblems. The build log is still written.
User Property: openapi.toolkit.lint.reportFile
<reportFormat> String - Format of reportFile: checkstyle, junit, json, codeclimate, or any format value.
Default: checkstyle
User Property: openapi.toolkit.lint.reportFormat
<skip> boolean - Skip execution. As the property openapi.toolkit.skip it skips every goal of the plugin; the goal-specific properties such as openapi.toolkit.lint.skip skip one goal.
Default: false
User Property: openapi.toolkit.skip
<skipLint> boolean - Skip this goal only; openapi.toolkit.skip skips every goal of the plugin.
Default: false
User Property: openapi.toolkit.lint.skip
<skipRules> List<String> - Rules not to evaluate, by rule id (for example info-license).
User Property: openapi.toolkit.lint.skipRules

Parameter Details

<apis>

The API descriptions to process: aliases from the apis section of the configuration file, paths relative to the project base directory, or URLs. Empty: every API in the configuration file. Without a configuration file, paths or URLs are required and Redocly's built-in recommended ruleset applies.
  • Type: java.util.List<java.lang.String>
  • Required: No
  • User Property: openapi.toolkit.apis

<configFile>

The Redocly configuration file. Unset: redocly.yaml in the project base directory if it exists, otherwise no configuration file.
  • Type: java.io.File
  • Required: No
  • User Property: openapi.toolkit.configFile

<extendsRulesets>

Replaces the extends list of the configuration. Built-in rulesets: minimal, recommended, recommended-strict, spec.
  • Type: java.util.List<java.lang.String>
  • Required: No
  • User Property: openapi.toolkit.extends
  • Alias: extends

<failOnErrors>

Fail the build when problems with severity error are found.
  • Type: boolean
  • Required: No
  • User Property: openapi.toolkit.lint.failOnErrors
  • Default: true

<failOnWarnings>

Fail the build when problems with severity warn are found.
  • Type: boolean
  • Required: No
  • User Property: openapi.toolkit.lint.failOnWarnings
  • Default: false

<format>

Format of the problems in the build log: stylish, codeframe, summary, markdown or github-actions (workflow annotations, printed without the Maven prefix). For machine-readable formats use reportFile.
  • Type: java.lang.String
  • Required: No
  • User Property: openapi.toolkit.lint.format
  • Default: stylish

<generateIgnoreFile>

Write every problem found to .redocly.lint-ignore.yaml next to the configuration file (or in the project base directory without one) instead of reporting it; later runs ignore those problems (redocly lint --generate-ignore-file). Does not fail the build.
  • Type: boolean
  • Required: No
  • User Property: openapi.toolkit.lint.generateIgnoreFile
  • Default: false

<lintConfig>

Severity of problems in the configuration file, which is linted before the goal runs: warn (reported, invalid entries are ignored), error (fails the build) or off.
  • Type: java.lang.String
  • Required: No
  • User Property: openapi.toolkit.lintConfig
  • Default: warn

<maxProblems>

Maximum number of problems printed to the build log, per API description and for the configuration file. Report files are not limited.
  • Type: int
  • Required: No
  • User Property: openapi.toolkit.maxProblems
  • Default: 100

<reportFile>

File to write all problems to, in reportFormat; not limited by maxProblems. The build log is still written.
  • Type: java.io.File
  • Required: No
  • User Property: openapi.toolkit.lint.reportFile

<reportFormat>

Format of reportFile: checkstyle, junit, json, codeclimate, or any format value.
  • Type: java.lang.String
  • Required: No
  • User Property: openapi.toolkit.lint.reportFormat
  • Default: checkstyle

<skip>

Skip execution. As the property openapi.toolkit.skip it skips every goal of the plugin; the goal-specific properties such as openapi.toolkit.lint.skip skip one goal.
  • Type: boolean
  • Required: No
  • User Property: openapi.toolkit.skip
  • Default: false

<skipLint>

Skip this goal only; openapi.toolkit.skip skips every goal of the plugin.
  • Type: boolean
  • Required: No
  • User Property: openapi.toolkit.lint.skip
  • Default: false

<skipRules>

Rules not to evaluate, by rule id (for example info-license).
  • Type: java.util.List<java.lang.String>
  • Required: No
  • User Property: openapi.toolkit.lint.skipRules