New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@redocly/openapi-cli

Package Overview
Dependencies
Maintainers
7
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@redocly/openapi-cli

OpenAPI CLI toolbox with rich validation and bundling features.

  • 1.0.0-beta.95
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
7
Created
Source

OpenAPI CLI toolset

OpenAPI CLI toolbox with rich validation and bundling features.

Travis (.org) npm (scoped) NPM

OpenAPI 3 CLI toolset

Features

Currently, @redocly/openapi-cli supports these features:

  • Multifile validation. No need to bundle your file before validation.
  • Lightning-fast validation. Lint a 1 Mb file in less than one second.
  • Built-in rules for common validations.
  • Configurable severity levels for each rule.
  • Human-readable error messages with codeframes and stylish format options.
  • Intuitive suggestions for misspelled types or references.
  • Easy to implement custom rules.
  • Bundle a multifile definition into a single file.
  • Decorators to modify a validated definition during bundling.
  • Preview reference docs for local development.
  • Support for OpenAPI 2 (fka Swagger) and OpenAPI 3.0.
  • Support for OpenAPI 3.1 (coming soon).

What makes this tool different

Unlike other OpenAPI linters, @redocly/openapi-cli defines the possible type tree of a valid OpenAPI definition and then traverses it. This approach is very similar to how linters for programming languages work and results in major performance benefits over other approaches. Extend functionality at different points in the lifecycle with preprocessors, rules, and decorators.

TLDR

npx @redocly/openapi-cli lint path-to-root-file.yaml

Read the docs

Credits

Thanks to graphql-js and eslint for inspiration of the definition traversal approach and to Swagger, Spectral, and OAS-Kit for inspiring the ruleset.

Keywords

FAQs

Package last updated on 05 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc