OpenAPI 规范验证器
Validates and lints OpenAPI 3.0/3.1 specifications using Spectral CLI rules and the Swagger Parser library. Detects breaking changes between spec versions and generates migration guides.
Prerequisites
Node.js
Installation
Use the upstream install or setup path that matches your environment:
- npm install -g @stoplight/spectral-cli
- yarn global add @stoplight/spectral-cli
Basic usage or getting-started notes:
- 💻 Usage
- ## 💻 Usage
- To get started, run this command in your terminal to create a .spectral.yaml file that uses the Spectral predefined rulesets based on OpenAPI, Arazzo or AsyncAPI:
- Source: https://github.com/1991513ccie-png/skills
- Extracted from upstream docs: https://raw.githubusercontent.com/stoplightio/spectral/HEAD/README.md
Documentation
- https://docs.stoplight.io/docs/spectral/ZG9jOjExNw-overview