From 6aebc7dc6071831b9a3a922b0355a914e1c20b04 Mon Sep 17 00:00:00 2001 From: Mike Ralphson Date: Wed, 16 Jan 2019 23:17:28 +0000 Subject: [PATCH] fix: a typo and a probable cut-and-paste error src/rulesets/oas3/index.ts and associated tests: 'specifcication' -> 'specification' in a comment `servers` must be, and is tested against, being an array not a string --- src/rulesets/oas3/__tests__/__snapshots__/api-servers.ts.snap | 4 ++-- src/rulesets/oas3/index.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rulesets/oas3/__tests__/__snapshots__/api-servers.ts.snap b/src/rulesets/oas3/__tests__/__snapshots__/api-servers.ts.snap index 259904e6f..b6857a253 100644 --- a/src/rulesets/oas3/__tests__/__snapshots__/api-servers.ts.snap +++ b/src/rulesets/oas3/__tests__/__snapshots__/api-servers.ts.snap @@ -10,7 +10,7 @@ Array [ ], "severity": 40, "severityLabel": "warn", - "summary": "OpenAPI \`servers\` must be present and non-empty string.", + "summary": "OpenAPI \`servers\` must be present and non-empty array.", }, ] `; @@ -25,7 +25,7 @@ Array [ ], "severity": 40, "severityLabel": "warn", - "summary": "OpenAPI \`servers\` must be present and non-empty string.", + "summary": "OpenAPI \`servers\` must be present and non-empty array.", }, ] `; diff --git a/src/rulesets/oas3/index.ts b/src/rulesets/oas3/index.ts index c97744e42..1bb2e9636 100644 --- a/src/rulesets/oas3/index.ts +++ b/src/rulesets/oas3/index.ts @@ -9,7 +9,7 @@ export { commonOasFunctions as oas3Functions } from '../oas'; export const oas3Rules = () => { return merge(commonOasRules(), { - // specifcication validation + // specification validation 'oas3-schema': { summary: 'Validate structure of OpenAPIv3 specification.', type: RuleType.VALIDATION, @@ -25,7 +25,7 @@ export const oas3Rules = () => { // generic rules 'api-servers': { - summary: 'OpenAPI `servers` must be present and non-empty string.', + summary: 'OpenAPI `servers` must be present and non-empty array.', type: RuleType.STYLE, given: '$', then: {