{"repo":"stoplightio/spectral","free":true,"listed":false,"github":"https://github.com/stoplightio/spectral","clone":"git clone https://github.com/stoplightio/spectral.git","description":"A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI (v3.1, v3.0, and v2.0), Arazzo v1.0, as well as AsyncAPI v2.x.","language":"TypeScript","stars":3182,"topics":["json-schema","jsonpath","openapi","openapi3","oasv3","oas","openapi-specification","json-lint","json","linting"],"license":"Apache-2.0","category":"api-integrations-sdks","readme_excerpt":"[ ][stoplight forest] - Custom Rulesets : Create custom rules to lint JSON or YAML objects - Ready-to-use Rulesets : Validate and lint OpenAPI v2 & v3.x , AsyncAPI , and Arazzo v1 Documents - API Style Guides : Automated API Style Guides using rulesets improve consistency across all your APIs - Ready-to-use Functions : Built-in set of functions to help create custom rules. Functions include pattern checks, parameter checks, alphabetical ordering, a specified number of characters, provided keys are present in an object, etc. - Custom Functions : Create custom functions for advanced use cases Overview - 🧰 Installation - 💻 Usage - 📖 Documentation - ℹ️ Support - 🌎 Real-World Rulesets - ⚙️ Integrations - 👏 Contributing - 🌲 Sponsor Spectral by Planting a Tree 🧰 Installation The easiest way to install spectral is to use either npm: Or yarn: There are also additional installation options. Docker The Docker image sends a lightweight anonymous telemetry ping on startup (version + platform) to help us understand adoption. To opt out, set DO NOT TRACK=1 or SCARF NO ANALYTICS=true : 💻 Usage 1. Create a local ruleset Spectral, being a generic YAML/JSON linter, needs a ruleset to lint files. A ruleset is a JSON, YAML, or JavaScript/TypeScript file (often the file is called .spectral.yaml for a YAML ruleset) 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 ","default_branch":null,"files":null,"tree":[],"storefront":"/r/stoplightio","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/stoplightio/spectral/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}