Skip to content

Commit

Permalink
chore: multiple schema distinction
Browse files Browse the repository at this point in the history
 - add new end line
 - modify warning message consts
  • Loading branch information
Petr Spacek committed Feb 23, 2021
1 parent a000f88 commit c445906
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/languageservice/parser/jsonParser07.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { URI } from 'vscode-uri';
import { DiagnosticSeverity, Range } from 'vscode-languageserver-types';
import { TextDocument } from 'vscode-languageserver-textdocument';
import { Diagnostic } from 'vscode-languageserver';
import { MissingRequiredPropWarning, TypeMismatchWarning, ConstWarning } from '../../../test/utils/errorMessages';
import { isArrayEqual } from '../utils/arrUtils';

const localize = nls.loadMessageBundle();
Expand Down Expand Up @@ -67,9 +66,9 @@ export enum ProblemType {
}

const ProblemTypeMessages: Record<ProblemType, string> = {
[ProblemType.missingRequiredPropWarning]: MissingRequiredPropWarning,
[ProblemType.typeMismatchWarning]: TypeMismatchWarning,
[ProblemType.constWarning]: ConstWarning,
[ProblemType.missingRequiredPropWarning]: 'Missing property "{0}".',
[ProblemType.typeMismatchWarning]: 'Incorrect type. Expected "{0}".',
[ProblemType.constWarning]: 'Value must be {0}.',
};
export interface IProblem {
location: IRange;
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/testMultipleSimilarSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@
},
"type": "object"
}
}
}

0 comments on commit c445906

Please sign in to comment.