Skip to content

Commit

Permalink
Fixed JSONpath in the path rulesets so we can use the latest version …
Browse files Browse the repository at this point in the history
…of spectral cli
  • Loading branch information
colin-mckibben-sp committed Oct 26, 2023
1 parent facb414 commit 714b083
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 997 deletions.
12 changes: 6 additions & 6 deletions nerm-path-ruleset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ functions:
rules:
path-parameters-must-have-description:
description: "Rule 303: Path/Query parameters must have a description: https://sailpoint-oss.github.io/sailpoint-api-guidelines/#303"
given: $.[*].parameters[?(@.$ref == null)]
given: $.*.parameters.*
severity: error
then:
field: description
function: truthy
path-parameters-must-have-a-lengthy-description:
description: "Rule 303: The description of parameters must be at least 8 characters: https://sailpoint-oss.github.io/sailpoint-api-guidelines/#303"
type: style
given: $.[*].parameters[?(@.$ref == null)]
given: $.*.parameters.*
severity: error
then:
field: description
Expand All @@ -30,23 +30,23 @@ rules:
min: 8
path-parameters-must-have-example:
message: "{{error}}: https://sailpoint-oss.github.io/sailpoint-api-guidelines/#304"
given: $.[*].parameters[?(@.$ref == null)]
given: $.*.parameters.*
severity: error
then:
function: parameter-example-check
functionOptions:
rule: 304
path-parameters-must-have-valid-formats-for-numbers-and-integers:
message: "{{error}}: https://sailpoint-oss.github.io/sailpoint-api-guidelines/#171"
given: $.[*].parameters[?(@.$ref == null)]
given: $.*.parameters.*
severity: error
then:
function: path-parameter-integer-number-formats
functionOptions:
rule: 171
path-summary-length:
message: "{{error}}: https://sailpoint-oss.github.io/sailpoint-api-guidelines/#305"
given: $[*].summary
given: $.*.summary
severity: warn
then:
function: word-count
Expand All @@ -55,7 +55,7 @@ rules:
rule: 305
path-description-html-chars:
message: "{{error}}"
given: $[*].description
given: $.*.description
severity: error
then:
function: path-descriptions-check
Expand Down
Loading

0 comments on commit 714b083

Please sign in to comment.