@redocly/openapi

WebJar for @redocly/openapi

Лицензия

Лицензия

MIT
Категории

Категории

Github Инструменты разработки Контроль версий CLI Взаимодействие с пользователем
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

github-com-redocly-openapi-cli
Последняя версия

Последняя версия

1.0.0-beta.44
Дата

Дата

Тип

Тип

jar
Описание

Описание

@redocly/openapi
WebJar for @redocly/openapi
Ссылка на сайт

Ссылка на сайт

https://www.webjars.org
Система контроля версий

Система контроля версий

https://github.com/redocly/openapi-cli

Скачать github-com-redocly-openapi-cli

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/github-com-redocly-openapi-cli/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>github-com-redocly-openapi-cli</artifactId>
    <version>1.0.0-beta.44</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-redocly-openapi-cli/
implementation 'org.webjars.npm:github-com-redocly-openapi-cli:1.0.0-beta.44'
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-redocly-openapi-cli/
implementation ("org.webjars.npm:github-com-redocly-openapi-cli:1.0.0-beta.44")
'org.webjars.npm:github-com-redocly-openapi-cli:jar:1.0.0-beta.44'
<dependency org="org.webjars.npm" name="github-com-redocly-openapi-cli" rev="1.0.0-beta.44">
  <artifact name="github-com-redocly-openapi-cli" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='github-com-redocly-openapi-cli', version='1.0.0-beta.44')
)
libraryDependencies += "org.webjars.npm" % "github-com-redocly-openapi-cli" % "1.0.0-beta.44"
[org.webjars.npm/github-com-redocly-openapi-cli "1.0.0-beta.44"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

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.

Usage

Node

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

Docker

To give the docker container access to the OpenAPI definition files, you need to mount the containing directory as a volume. Assuming the OAS definition is rooted in the current working directory, you need the following command:

docker run --rm -v $PWD:/spec redocly/openapi-cli lint path-to-root-file.yaml

To build and run with a local image, run the following from the project root:

docker build -t openapi-cli .
docker run --rm -v $PWD:/spec 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.

org.webjars.npm

Redocly

At last, API docs you can be proud of

Версии библиотеки

Версия
1.0.0-beta.44