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 6, 2023
1 parent 966cedf commit 1ea8451
Showing 1 changed file with 6 additions and 28 deletions.
34 changes: 6 additions & 28 deletions .spectral-oas.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,11 @@
functions:
- camara-language-spelling
- camara-language-avoid-telco
- camara-operationId-casing-convention
functionsDir: "./lint_function"
rules:
camara-language-spelling:
message: "{{error}}"
severity: warn
given:
- "$.info.title"
- "$.info.summary"
- "$.info.description"
- "$.paths.*.*.parameters[?(@.in==='query' || @.in==='path' || @.in==='cookie')].description"
- "$..properties.*.description"
then:
function: 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}}"
camel-case-name:
message: Operation Id must be in Camel case "{{error}}"
severity: hint
description: |
This rule checks Operation ids should follow a specific case convention: camel case.
This rule checks Operation ids should follow a specific case convention: camel case.
given: "$.paths.*.*.operationId"
then:
function: camara-operationId-casing-convention
function: casing
functionOptions:
type: camel

0 comments on commit 1ea8451

Please sign in to comment.