Spectral – flexible JSON/YAML linter

Spectral is 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.

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.

Linting isn’t just about validating OpenAPI or JSON Schema documents against specifications. It’s for enforcing style guides to ensure that your APIs are consistent, valid, and of high quality.

This is free and open source software.

Key Features

  • 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.

Website: github.com/stoplightio/spectral
Support:
Developer: Stoplight
License: Apache License 2.0

Spectral is written in TypeScript. Learn TypeScript with our recommended free books and free tutorials.


Related Software

OpenAPI Linters
SpectralFexible JSON/YAML linter
vacuumOpenAPI and Swagger linter
RedoclyAll-in-one OpenAPI utility
CherrybombAudit, validate, run API tests
ZallyMinimalistic, simple-to-use API linter
speccyEnforce quality rules on your OpenAPI specifications
Rate My OpenAPIImprove the quality of your OpenAPI specifications
OpenAPI ValidatorConfigurable and extensible validator/linter
OpenAPI Spec validatorValidates OpenAPI Specs
ovalCLI for (O)penAPI Specification document (val)idation
OpenAPI LinterCLI and a Node.js library
OAS-KitConvert Swagger 2.0 definitions to OpenAPI 3.0

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.

This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more.

Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form.
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted