Skip to main content
Version: 2.18 (deprecated)

openapi-generator


The OpenAPI Code generator (https://openapi-generator.tech)

Backend: pants.backend.experimental.openapi.codegen.java

Config section: [openapi-generator]

Basic options

None

Advanced options

artifacts

--openapi-generator-artifacts="['<str>', '<str>', ...]"
PANTS_OPENAPI_GENERATOR_ARTIFACTS
pants.toml
[openapi-generator]
artifacts = [
'<str>',
'<str>',
...,
]
default:
[
  "org.openapitools:openapi-generator-cli:{version}"
]

Artifact requirements for this tool using specified as either the address of a jvm_artifact target or, alternatively, as a colon-separated Maven coordinates (e.g., group:name:version). For Maven coordinates, the string {version} version will be substituted with the value of the [openapi-generator].version option.

jvm_options

--openapi-generator-jvm-options="['<str>', '<str>', ...]"
PANTS_OPENAPI_GENERATOR_JVM_OPTIONS
pants.toml
[openapi-generator]
jvm_options = [
'<str>',
'<str>',
...,
]
default: []

List of JVM options to pass to openapi-generator JVM processes.

Options set here will be added to those set in [jvm].global_options. Please check the documentation for the jvm subsystem to see what values are accepted here.

lockfile

--openapi-generator-lockfile=<str>
PANTS_OPENAPI_GENERATOR_LOCKFILE
pants.toml
[openapi-generator]
lockfile = <str>
default: <default>

Path to a lockfile used for installing the tool.

Set to the string <default> to use a lockfile provided by Pants, so long as you have not changed the --version option. See https://github.com/pantsbuild/pants/blob/release_2.18.3/src/python/pants/backend/openapi/subsystems/openapi_generator.default.lockfile.txt for the default lockfile contents.

To use a custom lockfile, set this option to a file path relative to the build root, then run pants jvm-generate-lockfiles --resolve=openapi-generator.

version

--openapi-generator-version=<str>
PANTS_OPENAPI_GENERATOR_VERSION
pants.toml
[openapi-generator]
version = <str>
default: 5.4.0

Version string for the tool. This is available for substitution in the [openapi-generator].artifacts option by including the string {version}.

Deprecated options

None

None