Skip to content

Commit

Permalink
Update .spectral.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
VijayKesharwani authored Mar 21, 2024
1 parent 55efab1 commit 6f5b705
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .spectral.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,13 @@ rules:
description: "Ensure that all path URLs have valid HTTP methods (GET, PUT, POST, DELETE, PATCH, OPTIONS)."
message: "Invalid HTTP method for '{{path}}'. Must be one of get, put, post, delete, patch, options."
severity: error
given: "$.paths[*]"
given: "$.paths[*][*]"
then:
- field: keys
function: pattern
functionOptions:
match: "^(get|put|post|delete|patch|options)$"
exclude: true # Exclude paths that match the pattern
errorMessage: "{{path}} does not have a valid HTTP method."
- where:
- has: [post, get, delete, put, patch, options]
errorUnless:
- allOf:
- pattern: "^(get|put|post|delete|patch|options)$"
recommended: true

camara-get-no-request-body:
Expand Down

0 comments on commit 6f5b705

Please sign in to comment.