OPENAPI-CLI TOOLBOX

Bring powerful OpenAPI validation & bundling to your command line

Validate OpenAPI definitions, with rich diagnostics.

GitHub

KEEP UNWIELDY OPENAPI DEFINITIONS UNDER CONTROL

With openapi-cli, you can quickly validate a multi-file OpenAPI definition. An unbundled definition is far easier to edit and to reduce duplicated type definitions. When the definition is ready, openapi-cli makes it easy to bundle it into one file for distribution.

Single source of truth

The openapi-cli tool makes it easy to document every type only once. Instead of a monolithic OpenAPI definition, it can be split over a directory hierarchy of definitions files, tied together using file references. You document a type once, and then reference it from everywhere it is needed.

Advanced OpenAPI validation

Verify the definition for correctness to the OpenAPI specification. Optionally suppress errors or extend with custom validation rules for corporate guidelines. Validate a multi-file definition without having to bundle it.

Find the error faster

Not only is OpenAPI CLI faster, it outputs errors and warnings with expanded code frames for context. With filename, line and character number precision you can directly navigate to the error and solve the issue faster. Our API registry uses OpenAPI CLI under the hood. For continuous validation of your API definitions, try us out.

Supports Swagger 2 and OpenAPI 3

Stuck on version 2? Not a problem. Using the latest version 3? Even better. The openapi-cli tool supports advanced OpenAPI v3 declarations like the discriminator, “one of”, “any of”, “all of”, or nullable, callbacks and links. It supports remote references by file path and URL.

Try OpenAPI-CLI today

Get it free

Simple to set up

No server required. The openapi-cli tool is installed from npm and executes at the command line.

$ openapi login

$ openapi preview-docs

Easy previewing

Includes a standalone Redoc community edition development server letting you preview the reference docs without having to bundle it first. For our Redocly clients, login and it includes a development server of our advanced reference docs product.

Docs-like-code

The files for the definition, as well as the Redocly configuration file, can be managed with a source code management system like Git, for advanced project management.

$ npx create-openapi-repo

Starting from scratch?

We have a companion repository template which installs a sample multi-file API definition and our OpenAPI CLI tool. If you are new to the multi-file format, try it out. It can also convert your existing API definition into a multi-file definition. Note that create-openapi-repo is only for the latest version of OpenAPI.

AT LAST, API DOCS YOU CAN BE PROUD OF.
REDOCLY, THE BEST API DOCUMENTATION TOOL.