Skip to content

Commit

Permalink
Update .spectral-oas.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
VijayKesharwani authored Nov 15, 2023
1 parent c198a9f commit 8c81377
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions .spectral-oas.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
functions:
- camara-language-spelling
- camara-language-avoid-telco
- camara-operationId-casing-convention
functionsDir: "./lint_function"
rules:
camara-language-spelling:
camara-language-avoid-telco:
message: "{{error}}"
severity: hint
description: |
This rule checks for telco-specific terminology in your API definitions and suggests more inclusive terms.
given: "$..*.*"
then:
function: camara-language-avoid-telco
camara-operationId-casing-convention:
message: "{{error}}"
severity: hint
description: |
This rule checks Operation ids should follow a specific case convention: camel case.
given: "$.paths.*.*.operationId"
then:
function: camara-operationId-casing-convention
camara-parameter-casing-convention:
description: Paths should be kebab-case.
message: "{{property}} should be kebab-case (lower-case and separated with hyphens)"
severity: warn
given:
- "$.info.title"
- "$.info.summary"
- "$.info.description"
- "$.paths.*.*.parameters[?(@.in==='query' || @.in==='path' || @.in==='cookie')].description"
- "$..properties.*.description"
given: $.paths[*]~
then:
function: "./lint_function/camara-language-spelling.js"
function: pattern
functionOptions:
match: "^(\/|[a-z0-9-.]+|{[a-zA-Z0-9_]+})+$"

0 comments on commit 8c81377

Please sign in to comment.