Skip to main content
Version: 2.28 (prerelease)

openapi-format


Format an OpenAPI document by ordering, formatting and filtering fields (https://github.com/thim81/openapi-format).

Backend: pants.backend.experimental.openapi.lint.openapi_format

Config section: [openapi-format]

Basic options

args

--openapi-format-args="[<shell_str>, <shell_str>, ...]"
PANTS_OPENAPI_FORMAT_ARGS
pants.toml
[openapi-format]
args = [
<shell_str>,
<shell_str>,
...,
]
default: []

Arguments to pass directly to openapi-format, e.g. --openapi-format-args='--no-sort'.

skip

--[no-]openapi-format-skip
PANTS_OPENAPI_FORMAT_SKIP
pants.toml
[openapi-format]
skip = <bool>
default: False

If true, don't use openapi-format when running pants fmt and pants lint.

Advanced options

binary_name

--openapi-format-binary-name=<str>
PANTS_OPENAPI_FORMAT_BINARY_NAME
pants.toml
[openapi-format]
binary_name = <str>
default: None

Override the binary to run for this tool. Defaults to the package name.

install_from_resolve

--openapi-format-install-from-resolve=<str>
PANTS_OPENAPI_FORMAT_INSTALL_FROM_RESOLVE
pants.toml
[openapi-format]
install_from_resolve = <str>
default: None

If specified, install the tool using the lockfile for this named resolve, instead of the version configured in this subsystem.

If unspecified, the tool will use the default configured package manager [nodejs].package_manager`, and install the tool without a lockfile.

version

--openapi-format-version=<str>
PANTS_OPENAPI_FORMAT_VERSION
pants.toml
[openapi-format]
version = <str>
default: openapi-format@1.13.1

Version string for the tool in the form package@version (e.g. prettier@3.5.2)

Deprecated options

None

None