Skip to content

Commit

Permalink
fix: a typo and a probable cut-and-paste error
Browse files Browse the repository at this point in the history
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
  • Loading branch information
MikeRalphson committed Jan 16, 2019
1 parent 25af8de commit 6aebc7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/rulesets/oas3/__tests__/__snapshots__/api-servers.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
},
]
`;
Expand All @@ -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.",
},
]
`;
4 changes: 2 additions & 2 deletions src/rulesets/oas3/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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: {
Expand Down

0 comments on commit 6aebc7d

Please sign in to comment.