Skip to content

ringcentral/vscode-openapi-linter

Repository files navigation

OpenAPI Linter for VS Code

It will lint YAML files which start with "openapi:". By default, it doesn't lint JSON files. You may change the openApiLinter.validateFiles settings to enable JSON support.

It is powered by Spectral. You can specify a custom ruleset file by adding

"openApiLinter.spectralRulesetsFile": "/path/to/.spectral.yml"

to settings.json of VS Code.

You could also put a .spectral.yml file at the root folder of your workspace to override the global settings.

If there is neither local nor global .spectral.yml specified. A default .spectral.yml file with content extends: ["spectral:oas", "spectral:asyncapi"] will be used.

For maintainers and contributors

References

Enable trace logging

Add the following to VS Code setting.json:

"openApiLinter.trace.server": "verbose"

Then go open the "OUTPUT" window of VS Code and check channel "OpenAPI Linter":

Release

yarn vsce package
yarn vsce publish

If Azure personal token expired, login dev.azure.com, find the publisher name, find the the token and edit it to extend its lifetime. No need to create a new token.

Known issues