From ab2b8307dd9131a479f0d86bbd0a86dfa68fb745 Mon Sep 17 00:00:00 2001 From: VijayKesharwani <122533719+VijayKesharwani@users.noreply.github.com> Date: Fri, 27 Oct 2023 15:26:51 +0530 Subject: [PATCH] Update .spectral-oas.yml --- .spectral-oas.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.spectral-oas.yml b/.spectral-oas.yml index a3c5a08565..dfe647507d 100644 --- a/.spectral-oas.yml +++ b/.spectral-oas.yml @@ -1,17 +1,24 @@ functions: + - check-spelling-code - check-telco-specific-terms functionsDir: "./lint_function" rules: + check-spelling-code: + message: "{{error}}" + severity: warn + given: + - "$.info.title" + - "$.info.summary" + - "$.info.description" + - "$.paths.*.*.parameters[?(@.in==='query' || @.in==='path' || @.in==='cookie')].description" + - "$..properties.*.description" + then: + function: check-spelling-code check-telco-specific-terms: message: "{{error}}" severity: hint description: | This rule checks for telco-specific terminology in your API definitions and suggests more inclusive terms. - given: - - "$.info.title" - - "$.info.summary" - - "$.info.description.*" - - "$.paths.*.*.description" - - "$.components.*.description" + given: "$..*.*" then: function: check-telco-specific-terms