All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Built-in OAS rule
openapi-tags
is now recommended #706 - CLI: Default
--fail-severity
is nowwarn
, so getting aninfo
or ahint
will not return a exit status code #706
- CLI: glob patterns and multiple paths are allowed #534
- CLI: control fail severity and result display #368
- CLI: new formatter - JUnit #478
- CLI: add possibility to proxy requests #446
- Built-in ruleset formats targeting JSON Schema files #571
{{value}}
and{{path}}
can be used in messages #520 #572
when
Rule property is deprecated #585
- Validation results produced by
alphabetical
function are more meaningful #613 - Enhanced JSON Schema enum validation #579
- Improved messages generated by
oasPathParam
function #537 - CLI: the amount of enabled rules is now displayed if you run Spectral with
--verbose
flag #435 - Stricter source matching for errors #615
schema
function can validate falsy values 10e5d1cschema
function can validate Draft 6 and Draft 7 JSON Schemas ea2ddff- Parameters in links objects are not linted for not having a description property. #272
- More accurate ranges for errors occurring in referenced files 6986b82
- CLI: stylish formatter reports
info
andhint
severity levels correctly #565
CLI: missing tslib #524
- Rulesets can be loaded using
Spectral#loadRuleset
method - Custom functions can be registered directly in rulesets
- Rulesets can be registered against document format
- New rules: no-$ref-siblings, oas2-anyOf, oas2-oneOf
- YAML's merge keys are supported
- $refs can be used in rulesets
- Resolved document is accessible now if you use
Spectral#runWithResolved
method #398
- valid-example rule has been broken into smaller, more specific rules #223
- YAML scalar values are parsed according to YAML 1.2 spec #481
- We swapped oclif with yargs
addRules
andaddFunctions
have been deprecated, usesetRules
andsetFunctions
instead- Importing built-in ruleset in cjs/esm module way (via require or import) is no longer recommended. Consider using
#loadRuleset
instead
- CLI: relative paths to documents are supported #474
- Improved path and ranges generation #458, #459
- Unknown schema formats are no longer printed #396
- Graceful handling of circular rulesets
- A few other minor issues
- Resolve references to files with relative paths
- Tweaked JSON Path lookup for paths to avoid deep scan, speeding up linting for large documents #413
- NPM install for Windows users was failing due to a dependency not supporting Windows in their build script
- Using the CLI with multiple, custom rulesets
- New syntax for rulesets, including overriding rules and extending rulesets
- More friendly errors and warnings
- CLI
--quiet
flag added to lint command, removing any output other than results - CLI
--skip-rules
flag added to lint command, to ignore certain rules
- CLI now reports errors and warnings for referenced (
$ref
) files
- Configuration files were briefly available in 3.x but removed in v4.0
- CLI
--max-results
flag is removed