All Projects → stoplightio → Spectral

stoplightio / Spectral

Licence: apache-2.0
A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI v2 & v3.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Spectral

Fastapi
FastAPI framework, high performance, easy to learn, fast to code, ready for production
Stars: ✭ 39,588 (+4419.18%)
Mutual labels:  swagger, openapi, json-schema, openapi3, json
Swagger Ui
Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
Stars: ✭ 21,279 (+2329.11%)
Mutual labels:  swagger, openapi, openapi3, openapi-specification, oas
Full Stack Fastapi Couchbase
Full stack, modern web application generator. Using FastAPI, Couchbase as database, Docker, automatic HTTPS and more.
Stars: ✭ 243 (-72.26%)
Mutual labels:  swagger, openapi, json-schema, openapi3, json
Swurg
Parse OpenAPI documents into Burp Suite for automating OpenAPI-based APIs security assessments (approved by PortSwigger for inclusion in their official BApp Store).
Stars: ✭ 94 (-89.27%)
Mutual labels:  swagger, openapi, openapi3, openapi-specification, json
Oas Kit
Convert Swagger 2.0 definitions to OpenAPI 3.0 and resolve/validate/lint
Stars: ✭ 516 (-41.1%)
Mutual labels:  swagger, openapi, openapi3, openapi-specification, linting
Apispec
A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification)..
Stars: ✭ 831 (-5.14%)
Mutual labels:  swagger, openapi, json-schema, openapi3, openapi-specification
openapi-schemas
JSON Schemas for every version of the OpenAPI Specification
Stars: ✭ 22 (-97.49%)
Mutual labels:  json-schema, swagger, openapi, openapi-specification, openapi3
Full Stack Fastapi Postgresql
Full stack, modern web application generator. Using FastAPI, PostgreSQL as database, Docker, automatic HTTPS and more.
Stars: ✭ 7,635 (+771.58%)
Mutual labels:  swagger, openapi, json-schema, openapi3, json
Redoc
📘 OpenAPI/Swagger-generated API Reference Documentation
Stars: ✭ 15,935 (+1719.06%)
Mutual labels:  swagger, openapi, openapi3, openapi-specification
Openapi Diff
Utility for comparing two OpenAPI specifications.
Stars: ✭ 208 (-76.26%)
Mutual labels:  swagger, openapi, openapi3, openapi-specification
Spot
Spot is a concise, developer-friendly way to describe your API contract.
Stars: ✭ 230 (-73.74%)
Mutual labels:  swagger, openapi, json-schema, openapi3
Openapi Directory
🌐 Wikipedia for Web APIs. Directory of REST API definitions in OpenAPI 2.0/3.x format
Stars: ✭ 2,635 (+200.8%)
Mutual labels:  swagger, openapi, openapi3, oas
Awesome Openapi3
😎 A list of awesome projects related to OpenAPI 3.0.x, curated by the community
Stars: ✭ 469 (-46.46%)
Mutual labels:  swagger, openapi, openapi3, oas
Openapi Spec Validator
OpenAPI Spec validator
Stars: ✭ 161 (-81.62%)
Mutual labels:  swagger, openapi, openapi3, oas
Prism
Turn any OpenAPI2/3 and Postman Collection file into an API server with mocking, transformations and validations.
Stars: ✭ 2,484 (+183.56%)
Mutual labels:  swagger, openapi, openapi3, oas
openapi4j
OpenAPI 3 parser, JSON schema and request validator.
Stars: ✭ 92 (-89.5%)
Mutual labels:  json-schema, openapi, openapi-specification, openapi3
Swagger Parser
Swagger Spec to Java POJOs
Stars: ✭ 468 (-46.58%)
Mutual labels:  swagger, openapi, openapi3, openapi-specification
openapi-schema-validator
OpenAPI schema validator for Python
Stars: ✭ 35 (-96%)
Mutual labels:  swagger, openapi, oas, openapi3
Kaizen Openapi Editor
Eclipse Editor for the Swagger-OpenAPI Description Language
Stars: ✭ 97 (-88.93%)
Mutual labels:  swagger, openapi, openapi3, json
Openapi Core
OpenAPI core
Stars: ✭ 119 (-86.42%)
Mutual labels:  swagger, openapi, openapi3, oas

Demo of Spectral linting an OpenAPI document from the CLI CircleCI NPM Downloads Treeware (Trees)

  • Custom Rulesets: Create custom rules to lint JSON or YAML objects
  • Ready-to-use Rulesets: Validate and lint OpenAPI v2 & v3 and AsyncAPI Documents
  • JSON Path Support: Use JSON path to apply rules to specific parts of your objects
  • 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
  • JSON Validation: Validate JSON with Ajv

Demo of Spectral linting an OpenAPI document from the CLI

Overview

🧰 Installation and Usage

Install

npm install -g @stoplight/spectral

# OR

yarn global add @stoplight/spectral

Find more installation methods in our documentation.

Lint

spectral lint petstore.yaml

📖 Documentation and Community

ℹ️ Support

If you need help using Spectral or have a support question, please use GitHub Discussions. It's also a great place to share your rulesets, or tools that leverage Spectral.

If you have a bug or feature request, please create an issue.

❓ FAQs

How is this different to Ajv

Ajv is a JSON Schema validator, and Spectral is a JSON/YAML linter. Instead of just validating against JSON Schema, it can be used to write rules for any sort of JSON/YAML object, which could be JSON Schema, or OpenAPI, or anything similar. Spectral does expose a schema function that you can use in your rules to validate all or part of the target object with JSON Schema (we even use Ajv used under the hood for this), but that's just one of many functions.

I want to lint my OpenAPI documents but don't want to implement Spectral right now.

No problem! A hosted version of Spectral comes free with the Stoplight platform. Sign up for a free account here.

What is the difference between Spectral and Speccy

Speccy was a great inspiration for Spectral, but was designed to work only with OpenAPI v3. Spectral can apply rules to any JSON/YAML object (including OpenAPI v2/v3 and AsyncAPI). It's mostly been abandoned now, and is JavaScript not TypeScript.

⚙️ Integrations

🏁 Help Others Utilize Spectral

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 🎉

👏 Contributing

If you are interested in contributing to Spectral, check out CONTRIBUTING.md.

🎉 Thanks

📜 License

Spectral is 100% free and open-source, under Apache License 2.0.

🌲 Sponsor Spectral by Planting a Tree

This package is Treeware so if you would like to thank us for creating it, we ask that you buy the world a tree.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].