# stoplightio/spectral

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.

Repository: https://github.com/stoplightio/spectral
Canonical: https://ross.abutalabs.com/products/spectral
Homepage: https://stoplight.io/spectral
Language: TypeScript
License: Apache-2.0
License Family: permissive
Topics: json-schema, jsonpath, openapi, openapi3, oasv3, oas, openapi-specification, json-lint, json, linting, swagger, hacktoberfest, arazzo, stoplight-oss, stoplight-spectral, swagger-oss
Last push: 2026-08-26T14:14:42+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 84, longevity 100
- inputs: {"age_days": 2940, "days_push": 7, "days_rel": 30, "gap_med": 33.5, "n_releases_24m": 9}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3189, forks 291 (observed 2026-08-28T04:07:48.098827+00:00)

## What it is
Spectral is a flexible JSON/YAML linter for creating automated API style guides, with built-in rulesets for OpenAPI v2/v3.x, AsyncAPI v2.x, and Arazzo v1.0. It runs as a CLI, JavaScript library, or Docker image, and supports custom rules and functions for linting any JSON or YAML documents.

## Use cases
- lint openapi specifications for style guide violations
- enforce api naming conventions across a team
- validate asyncapi documents in ci
- create custom rulesets for /yaml files
- automate api governance checks in a pipeline
- check swagger v2 documents for consistency

## When to choose
- you need automated API style guide enforcement
- you want ready-made OpenAPI/AsyncAPI linting rules
- you need a generic JSON/YAML linter with custom rules

## When to avoid
- you need runtime API validation rather than document linting
- you lint formats other than JSON/YAML

## Facets
- artifact type: cli-tool
- maturity: active
- function: linter, parser, developer-tools, cli
- domain: apis, developer-tools, web-development
- platform: cli, cross-platform
- tags: openapi, asyncapi, arazzo, -yaml-linter, api-style-guides, rulesets, api-governance, automation, nodejs, docker

## Member repositories
- stoplightio/spectral (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:48.098827+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:45:00.625659+00:00, confidence not recorded.
  - readme: https://github.com/stoplightio/spectral (fetched 2026-08-28T04:07:48.098827+00:00, sha dc8e5c918766)
  - homepage: https://stoplight.io/spectral (fetched 2026-08-29T09:39:21.445501+00:00, sha 68450a7b037b)
  - site_page: https://docs.stoplight.io/ (fetched 2026-08-29T09:39:21.455008+00:00, sha a30be4a84572)
  - site_page: https://stoplight.io/about (fetched 2026-08-29T09:39:21.459046+00:00, sha 2ed9f2f75d44)
  - site_page: https://docs.stoplight.io/docs/spectral/01baf06bdd05a-rulesets (fetched 2026-08-29T09:39:21.462153+00:00, sha 70b95ceab15a)
  - site_page: https://docs.stoplight.io/docs/spectral/a630feff97e3a-concepts (fetched 2026-08-29T09:39:21.463797+00:00, sha deca956698a1)
  - site_page: https://docs.stoplight.io/docs/spectral/9ffa04e052cc1-spectral-cli (fetched 2026-08-29T09:39:21.465372+00:00, sha abdbf934eaa0)
  - site_page: https://docs.stoplight.io/docs/platform/7975f76a794c4-validation-and-linting (fetched 2026-08-29T09:39:21.468245+00:00, sha 2f2621e82320)
  - site_page: https://stoplight.io/pricing (fetched 2026-08-29T09:39:21.457085+00:00, sha 070c1e91d9e8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
