Spectral, an Open Source JSON/YAML Linter

Improve the quality of your API descriptions, Kubernetes config, GitHub Actions, or any other JSON/YAML data. Get automatic validation & linting warnings, powered by Spectral, when you use Stoplight.

Get the Latest Public Style Guides Release

Keep unwieldy JSON and YAML files under control

Spectral is an open source JSON/YAML linter, which allows you to create style guides for your structured data; things like OpenAPI/AsyncAPI/RAML descriptions, Kubernetes config, GitHub Actions, you name it, Spectral can help you lint it. Go beyond making sure they are "Technically Correct", make sure they are useful.

Enable Industry Best Practices with Public Style Guides

Creating style guide rules can be daunting. But now it doesn’t have to be! Public Style Guides are preset style guides that can be implemented with a few clicks in your Stoplight projects. Public Style Guides are sets of curated rules from top companies around security and design themes. Use these preset rules to inform your own API style guides and tweak the rules according to your needs, or enable a preset guide to use out-of-the-box best practices in your Stoplight projects.

Style Guide Features Built on Spectral

New Style Guides Projects in Stoplight Platform generate documentation for errors and responses. This documentation can be used to easily socialize the style guide within the company. Use CI pipelines to apply style guides for different Git repositories; use spectral-cli and spectral action to achieve this in various git providers.

Stoplight Studio Integration

Want to create and edit API descriptions with a visual editor instead of scratching YAML into a cave wall with a rock? Use Stoplight Studio, and let Spectral give you feedback in real-time.

Improve the quality of your APIs and descriptions

API description formats like the OpenAPI Specification can be permissive and vague. Beginner API designers can struggle to know what to do, and experienced API designers can easily forget.

It's easy to create valid description documents that are not very useful, and end up looking broken in documentation tools, or not provide enough validation keywords to be useful for contract testing.

Reduce decision-making and promote consistent API descriptions

Ask 100 API designers what makes a good API design and you'll get 101 answers, but all most developers really want is consistency. Using a style guide can reduce decision making and improve consistency for all your teams.

You can use the default style guide, extend it, or create one to match your organization's style guide.

Use CLI and JavaScript interfaces

Spectral can be downloaded as a CLI binary for macOS, Linux or Windows, or installed as a npm/Yarn package with a CLI and a JavaScript API. Bake it into your existing tooling, run it in Continuous Integration, use it in any workflow you like.
Do you want feedback on your API descriptions right now?