Skip to content

Commit

Permalink
update linter ruleset
Browse files Browse the repository at this point in the history
  • Loading branch information
Long Le authored and Long Le committed Sep 12, 2024
1 parent 1f15cf6 commit a6158ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 7 additions & 5 deletions dev/tykapi-auth-ruleset.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
extends: 'spectral:oas'

rules:
check-authentication-methods:
description: "At least one of 'enable_jwt' or 'use_mutual_tls_auth' must be true."
given: "$.api_definition"
then:
- field: 'enable_jwt'
- field: "enable_jwt"
function: truthy
- field: 'use_mutual_tls_auth'
functionOptions:
negation: true # Should not be false
- field: "use_mutual_tls_auth"
function: truthy
functionOptions:
negation: true # Should not be false
severity: error
message: "At least one of 'api_definition.enable_jwt' or 'api_definition.use_mutual_tls_auth' must be true."
message: "At least one of 'api_definition.enable_jwt' or 'api_definition.use_mutual_tls_auth' must be true."
2 changes: 0 additions & 2 deletions dev/tykapi-ruleset.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extends: 'spectral:oas'

rules:
no-keyless-auth:
description: APIs must not be keyless
Expand Down

0 comments on commit a6158ec

Please sign in to comment.