@stoplight/spectral

v5.0.0-beta4
A flexible object linter with out of the box support for OpenAPI v2 and v3.
json linter linter json validator validator OpenAPI Swagger schema API

cli

node -r ts-node/register -r tsconfig-paths/register src/cli/index.ts

lint

tsc --noEmit && tslint 'src/**/*.ts'

test

jest --silent

build

tsc -p ./tsconfig.build.json

pretest

node ./scripts/generate-assets.js

lint.fix

yarn lint --fix

prebuild

yarn build.clean && copyfiles -u 1 "src/rulesets/oas*/**/*.json" dist && copyfiles -u 1 "src/rulesets/oas*/**/*.json" ./ && yarn copy.html-templates

cli:debug

node -r ts-node/register -r tsconfig-paths/register --inspect-brk src/cli/index.ts

postbuild

yarn build.oas-functions && yarn generate-assets

test.prod

yarn build && yarn lint && yarn test.karma && yarn test --coverage --maxWorkers=2

test.karma

karma start

test.watch

yarn test --watch

build.clean

rimraf ./coverage && rimraf ./dist && rimraf ./rulesets && rimraf ./__karma__/__fixtures__

test.update

yarn test --updateSnapshot

build.binary

pkg . --output ./binaries/spectral

test.harness

jest -c ./jest.harness.config.js

pretest.karma

node ./scripts/generate-karma-fixtures.js && yarn pretest

schema.update

yarn typescript-json-schema --id "http://stoplight.io/schemas/rule.schema.json" --required tsconfig.json IRule --out ./src/meta/rule.schema.json

inline-version

./scripts/inline-version.js

generate-assets

node ./scripts/generate-assets.js

prebuild.binary

yarn build

build.oas-functions

rollup -c

copy.html-templates

copyfiles -u 1 "./src/formatters/html/*.html" "./dist/"

postbuild.oas-functions

copyfiles -u 1 "dist/rulesets/oas*/functions/*.js" ./
npm i @stoplight/[email protected]

Metadata

Downloads