We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e36d120 commit 115dc4fCopy full SHA for 115dc4f
src/languageservice/services/yamlSchemaService.ts
@@ -170,6 +170,9 @@ export class YAMLSchemaService extends JSONSchemaService {
170
const schemaVersion = this.detectSchemaVersion(schema);
171
const validator = this.getValidatorForVersion(schemaVersion);
172
const metaSchemaUrl = this.getSchemaMetaSchema(schemaVersion);
173
+ if (!validator.hasSchema(schema)) {
174
+ validator.registerSchema({ $schema: metaSchemaUrl, type: 'string' }, schema);
175
+ }
176
177
// Validate the schema against its meta-schema using the URL directly
178
const result = await validator.validate(metaSchemaUrl, schema, 'BASIC');
0 commit comments