@stoplight/spectral

WebJar for @stoplight/spectral

License

License

Apache-2.0
Categories

Categories

Github Development Tools Version Controls
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

github-com-stoplightio-spectral-
Last Version

Last Version

0.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

@stoplight/spectral
WebJar for @stoplight/spectral
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/stoplightio/spectral

Download github-com-stoplightio-spectral-

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/github-com-stoplightio-spectral-/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>github-com-stoplightio-spectral-</artifactId>
    <version>0.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-stoplightio-spectral-/
implementation 'org.webjars.npm:github-com-stoplightio-spectral-:0.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-stoplightio-spectral-/
implementation ("org.webjars.npm:github-com-stoplightio-spectral-:0.0.0")
'org.webjars.npm:github-com-stoplightio-spectral-:jar:0.0.0'
<dependency org="org.webjars.npm" name="github-com-stoplightio-spectral-" rev="0.0.0">
  <artifact name="github-com-stoplightio-spectral-" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='github-com-stoplightio-spectral-', version='0.0.0')
)
libraryDependencies += "org.webjars.npm" % "github-com-stoplightio-spectral-" % "0.0.0"
[org.webjars.npm/github-com-stoplightio-spectral- "0.0.0"]

Dependencies

compile (26)

Group / Artifact Type Version
org.webjars.npm : proxy-agent jar [3.1.1]
org.webjars.npm : eol jar [0.9.1]
org.webjars.npm : stoplight__json-ref-resolver jar [3.1.1]
org.webjars.npm : nimma jar [0.0.0]
org.webjars.npm : stoplight__json-ref-readers jar [1.2.1]
org.webjars.npm » ajv-oai jar [1.2.0]
org.webjars.npm : abort-controller jar [3.0.0]
org.webjars.npm : fast-glob jar [3.2.5]
org.webjars.npm : stoplight__yaml jar [4.2.1]
org.webjars.npm : chalk jar [4.1.0]
org.webjars.npm : node-fetch jar [2.6.1]
org.webjars.npm : ajv jar [6.12.5]
org.webjars.npm : tslib jar [1.13.0]
org.webjars.npm : stoplight__lifecycle jar [2.3.2]
org.webjars.npm : stoplight__types jar [11.9.0]
org.webjars.npm : yargs jar [15.4.1]
org.webjars.npm : expression-eval jar [3.1.2]
org.webjars.npm : text-table jar [0.2,0.3)
org.webjars.npm : strip-ansi jar [6.0,6.1)
org.webjars.npm : lodash jar [4.17.20]
org.webjars.npm : stoplight__better-ajv-errors jar [0.0.3]
org.webjars.npm : nanoid jar [2.1.11]
org.webjars.npm : stoplight__path jar [1.3.2]
org.webjars.npm : blueimp-md5 jar [2.18.0]
org.webjars.npm : stoplight__json jar [3.10.2]
org.webjars.npm : jsonpath-plus jar [4.0.0]

Project Modules

There are no modules declared in this project.

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.

org.webjars.npm

Stoplight

Stoplight leverages your OpenAPI documents to drive the entire API development process

Versions

Version
0.0.0