
Product
Introducing Rust Support in Socket
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
@stoplight/spectral
Advanced tools
[](https://stoplight.io/api-governance?utm_source=github&utm_medium=spectral&utm_campaign=readme) [ that contains a collection of rules, which can be used to lint other JSON or YAML files such as an API description.
To get started, run this command in your terminal to create a .spectral.yaml
file that will use Spectral's predefined rulesets based on OpenAPI or AsyncAPI:
echo 'extends: ["spectral:oas", "spectral:asyncapi"]' > .spectral.yaml
If you would like to create your own rules, check out the Custom Rulesets page.
Use this command if you have a ruleset file in the same directory as the documents you are linting:
spectral lint myapifile.yaml
Use this command to lint with a custom ruleset, or one that's located in a different directory than the documents being linted:
spectral lint myapifile.yaml --ruleset myruleset.yaml
Once you've had a look through the getting started material, some of these guides can help you become a power user.
If you need help using Spectral or have any questions, please use GitHub Discussions, or visit the Stoplight Community Discord. These communities are a great place to share your rulesets, or show off tools that leverage Spectral.
If you have a bug or feature request, please create an issue.
$ref
(probably to minimize conflicts), naming conventions for Operation IDs, and all sorts of other handy OpenAPI tips.application/json
.Here are more real-world examples of Spectral in action.
If you're using Spectral for an interesting use case, contact us for a case study. We'll add it to a list here. Spread the goodness 🎉
If you are interested in contributing to Spectral, check out CONTRIBUTING.md.
Spectral is 100% free and open-source, under Apache License 2.0.
If you would like to thank us for creating Spectral, we ask that you buy the world a tree.
FAQs
[](https://stoplight.io/api-governance?utm_source=github&utm_medium=spectral&utm_campaign=readme) [![CircleCI](https://img.shields.io/circleci/build/github/stoplight
The npm package @stoplight/spectral receives a total of 109,030 weekly downloads. As such, @stoplight/spectral popularity was classified as popular.
We found that @stoplight/spectral demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 34 open source maintainers collaborating on the project.
Did you know?
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.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.