Skip to content

Commit

Permalink
fix(ls): fix typos in lint messages (#2652)
Browse files Browse the repository at this point in the history
Refs #2392
  • Loading branch information
char0n committed Mar 24, 2023
1 parent 8d8e4d9 commit fee2e93
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { LinterMeta } from '../../../../apidom-language-types';
const requiredFieldsLint: LinterMeta = {
code: ApilintCodes.OPENAPI3_0_HEADER_REQUIRED_FIELDS,
source: 'apilint',
message: 'Header Object must contain one the following fields: content, schema',
message: 'Header Object must contain one of the following fields: content, schema',
severity: DiagnosticSeverity.Error,
linterFunction: 'hasRequiredField',
linterParams: ['content'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { LinterMeta } from '../../../../apidom-language-types';
const requiredFieldsLint: LinterMeta = {
code: ApilintCodes.OPENAPI3_1_OPEN_API_REQUIRED_FIELDS,
source: 'apilint',
message: 'OpenAPI Object must contain one the following fields: paths, components, webhooks',
message: 'OpenAPI Object must contain one of the following fields: paths, components, webhooks',
severity: DiagnosticSeverity.Error,
linterFunction: 'hasRequiredField',
linterParams: ['paths'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { LinterMeta } from '../../../../apidom-language-types';
const requiredFieldsLint: LinterMeta = {
code: ApilintCodes.OPENAPI3_0_PARAMETER_REQUIRED_FIELDS,
source: 'apilint',
message: 'Parameter Object must contain one the following fields: content, schema',
message: 'Parameter Object must contain one of the following fields: content, schema',
severity: DiagnosticSeverity.Error,
linterFunction: 'hasRequiredField',
linterParams: ['content'],
Expand Down
6 changes: 3 additions & 3 deletions packages/apidom-ls/test/custom-rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ describe('apidom-ls-validate-custom-rules', function () {
start: { line: 18, character: 4 },
end: { line: 18, character: 7 },
},
message: 'Parameter Object must contain one the following fields: content, schema',
message: 'Parameter Object must contain one of the following fields: content, schema',
severity: 1,
code: 5150001,
source: 'apilint',
Expand Down Expand Up @@ -124,7 +124,7 @@ describe('apidom-ls-validate-custom-rules', function () {
start: { line: 21, character: 4 },
end: { line: 21, character: 8 },
},
message: 'Parameter Object must contain one the following fields: content, schema',
message: 'Parameter Object must contain one of the following fields: content, schema',
severity: 1,
code: 5150001,
source: 'apilint',
Expand All @@ -144,7 +144,7 @@ describe('apidom-ls-validate-custom-rules', function () {
start: { line: 24, character: 4 },
end: { line: 24, character: 7 },
},
message: 'Parameter Object must contain one the following fields: content, schema',
message: 'Parameter Object must contain one of the following fields: content, schema',
severity: 1,
code: 5150001,
source: 'apilint',
Expand Down

0 comments on commit fee2e93

Please sign in to comment.