Skip to content

Commit

Permalink
Release v4.0.2 (#416)
Browse files Browse the repository at this point in the history
* perf: improve paths lookup (#413)

* chore: prepping v4.0.2
  • Loading branch information
Phil Sturgeon authored Jul 31, 2019
1 parent 87411e1 commit b1efa84
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [4.0.1] - 2019-08-16
## [4.0.2] - 2019-07-31
### Fixed
- Tweaked JSON Path lookup for paths to avoid deep scan, speeding up linting for large documents [#413](https://github.com/stoplightio/spectral/pull/413)

## [4.0.1] - 2019-07-16
### Fixed
- NPM install for Windows users was failing due to a dependency not supporting Windows in their build script

## [4.0.0] - 2019-08-09
## [4.0.0] - 2019-07-09
### Added
- Using the CLI with multiple, custom rulesets
- New syntax for rulesets, including overriding rules and extending rulesets
Expand Down
24 changes: 12 additions & 12 deletions src/rulesets/oas/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Operation must have at least one `2xx` response.",
"recommended": true,
"type": "style",
"given": "$..paths.*[?( @property === 'get' || @property === 'put' || @property === 'post' || @property === 'delete' || @property === 'options' || @property === 'head' || @property === 'patch' || @property === 'trace' )]",
"given": "$.paths.*[?( @property === 'get' || @property === 'put' || @property === 'post' || @property === 'delete' || @property === 'options' || @property === 'head' || @property === 'patch' || @property === 'trace' )]",
"then": {
"field": "responses",
"function": "oasOp2xxResponse"
Expand All @@ -17,7 +17,7 @@
"description": "Operations with an `in: formData` parameter must include `application/x-www-form-urlencoded` or `multipart/form-data` in their `consumes` property.",
"recommended": true,
"type": "validation",
"given": "$..paths.*[?( @property === 'get' || @property === 'put' || @property === 'post' || @property === 'delete' || @property === 'options' || @property === 'head' || @property === 'patch' || @property === 'trace' )]",
"given": "$.paths.*[?( @property === 'get' || @property === 'put' || @property === 'post' || @property === 'delete' || @property === 'options' || @property === 'head' || @property === 'patch' || @property === 'trace' )]",
"then": {
"function": "oasOpFormDataConsumeCheck"
},
Expand Down Expand Up @@ -246,7 +246,7 @@
"description": "Operations must have a default response.",
"recommended": false,
"type": "style",
"given": "$..paths.*.*.responses",
"given": "$.paths.*.*.responses",
"then": {
"field": "default",
"function": "truthy"
Expand All @@ -259,7 +259,7 @@
"description": "Operation `description` must be present and non-empty string.",
"recommended": true,
"type": "style",
"given": "$..paths.*[?( @property === 'get' || @property === 'put' || @property === 'post' || @property === 'delete' || @property === 'options' || @property === 'head' || @property === 'patch' || @property === 'trace' )]",
"given": "$.paths.*[?( @property === 'get' || @property === 'put' || @property === 'post' || @property === 'delete' || @property === 'options' || @property === 'head' || @property === 'patch' || @property === 'trace' )]",
"then": {
"field": "description",
"function": "truthy"
Expand All @@ -272,7 +272,7 @@
"description": "Operation should have an `operationId`.",
"recommended": true,
"type": "style",
"given": "$..paths.*[?( @property === 'get' || @property === 'put' || @property === 'post' || @property === 'delete' || @property === 'options' || @property === 'head' || @property === 'patch' || @property === 'trace' )]",
"given": "$.paths.*[?( @property === 'get' || @property === 'put' || @property === 'post' || @property === 'delete' || @property === 'options' || @property === 'head' || @property === 'patch' || @property === 'trace' )]",
"then": {
"field": "operationId",
"function": "truthy"
Expand All @@ -285,7 +285,7 @@
"description": "operationId may only use characters that are valid when used in a URL.",
"recommended": true,
"type": "validation",
"given": "$..paths.*[?( @property === 'get' || @property === 'put' || @property === 'post' || @property === 'delete' || @property === 'options' || @property === 'head' || @property === 'patch' || @property === 'trace' )]",
"given": "$.paths.*[?( @property === 'get' || @property === 'put' || @property === 'post' || @property === 'delete' || @property === 'options' || @property === 'head' || @property === 'patch' || @property === 'trace' )]",
"then": {
"field": "operationId",
"function": "pattern",
Expand All @@ -301,7 +301,7 @@
"description": "Operation may only have one tag.",
"recommended": false,
"type": "style",
"given": "$..paths.*[?( @property === 'get' || @property === 'put' || @property === 'post' || @property === 'delete' || @property === 'options' || @property === 'head' || @property === 'patch' || @property === 'trace' )]",
"given": "$.paths.*[?( @property === 'get' || @property === 'put' || @property === 'post' || @property === 'delete' || @property === 'options' || @property === 'head' || @property === 'patch' || @property === 'trace' )]",
"then": {
"field": "tags",
"function": "length",
Expand All @@ -317,7 +317,7 @@
"description": "Operation `summary` should start with upper case and end with a dot.",
"recommended": false,
"type": "style",
"given": "$..paths.*[?( @property === 'get' || @property === 'put' || @property === 'post' || @property === 'delete' || @property === 'options' || @property === 'head' || @property === 'patch' || @property === 'trace' )]",
"given": "$.paths.*[?( @property === 'get' || @property === 'put' || @property === 'post' || @property === 'delete' || @property === 'options' || @property === 'head' || @property === 'patch' || @property === 'trace' )]",
"then": {
"field": "summary",
"function": "pattern",
Expand All @@ -333,7 +333,7 @@
"description": "Operation should have non-empty `tags` array.",
"recommended": true,
"type": "style",
"given": "$..paths.*[?( @property === 'get' || @property === 'put' || @property === 'post' || @property === 'delete' || @property === 'options' || @property === 'head' || @property === 'patch' || @property === 'trace' )]",
"given": "$.paths.*[?( @property === 'get' || @property === 'put' || @property === 'post' || @property === 'delete' || @property === 'options' || @property === 'head' || @property === 'patch' || @property === 'trace' )]",
"then": {
"field": "tags",
"function": "truthy"
Expand Down Expand Up @@ -363,7 +363,7 @@
"description": "given declarations cannot be empty, ex.`/given/{}` is invalid.",
"recommended": true,
"type": "style",
"given": "$..paths",
"given": "$.paths",
"then": {
"field": "@key",
"function": "pattern",
Expand All @@ -379,7 +379,7 @@
"description": "given keys should not end with a slash.",
"recommended": true,
"type": "style",
"given": "$..paths",
"given": "$.paths",
"then": {
"field": "@key",
"function": "pattern",
Expand All @@ -395,7 +395,7 @@
"description": "given keys should not include a query string.",
"recommended": true,
"type": "style",
"given": "$..paths",
"given": "$.paths",
"then": {
"field": "@key",
"function": "pattern",
Expand Down

0 comments on commit b1efa84

Please sign in to comment.