@@ -7,7 +7,6 @@ import { promisify } from 'util';
77import { getLanguageService } from 'vscode-json-languageservice' ;
88import { TextDocument } from 'vscode-languageserver-types' ;
99import draft4MetaSchema from 'ajv/lib/refs/json-schema-draft-04.json' ;
10- import draft7MetaSchema from 'ajv/lib/refs/json-schema-draft-07.json' ;
1110import * as schemaTestsRunner from './schemaTestsRunner' ;
1211import 'mocha' ;
1312import { findCycle } from './cycleCheck' ;
@@ -20,15 +19,13 @@ const testSchemasFolder = __dirname + '/schemas/';
2019const templateTestsFolder = __dirname + '/templateTests/' ;
2120const armSchemasPrefix = / ^ h t t p s ? : \/ \/ s c h e m a \. m a n a g e m e n t \. a z u r e \. c o m \/ s c h e m a s \/ /
2221const jsonSchemaDraft4Prefix = / ^ h t t p s ? : \/ \/ j s o n - s c h e m a \. o r g \/ d r a f t - 0 4 \/ s c h e m a /
23- const jsonSchemaDraft7Prefix = / ^ h t t p s ? : \/ \/ j s o n - s c h e m a \. o r g \/ d r a f t - 0 7 \/ s c h e m a /
2422
2523const ajvInstance = new Ajv ( {
2624 loadSchema : loadSchema ,
2725 strictDefaults : true ,
2826 schemaId : 'id' ,
29- meta : false
27+ meta : true ,
3028 } ) . addMetaSchema ( draft4MetaSchema )
31- . addMetaSchema ( draft7MetaSchema )
3229 . addFormat ( 'int32' , / .* / )
3330 . addFormat ( 'duration' , / .* / )
3431 . addFormat ( 'password' , / .* / ) ;
@@ -46,9 +43,6 @@ async function loadRawSchema(uri: string) : Promise<string> {
4643 else if ( uri . match ( jsonSchemaDraft4Prefix ) ) {
4744 return JSON . stringify ( draft4MetaSchema ) ;
4845 }
49- else if ( uri . match ( jsonSchemaDraft7Prefix ) ) {
50- return JSON . stringify ( draft7MetaSchema ) ;
51- }
5246 else {
5347 jsonPath = uri ;
5448 }
@@ -91,7 +85,6 @@ function listSchemaPaths(basePath: string): string[] {
9185
9286const metaSchemaPaths = [
9387 'http://json-schema.org/draft-04/schema' ,
94- 'http://json-schema.org/draft-07/schema' ,
9588 testSchemasFolder + 'ResourceMetaSchema.json' ,
9689] ;
9790
@@ -140,6 +133,7 @@ const schemasToSkip = [
140133 '2019-08-01/managementGroupDeploymentTemplate.json' ,
141134 '2019-08-01/tenantDeploymentParameters.json' ,
142135 '2019-08-01/tenantDeploymentTemplate.json' ,
136+ '2021-09-09/uiFormDefinition.schema.json' ,
143137 'common/definitions.json' ,
144138 'common/manuallyAddedResources.json' ,
145139 'common/autogeneratedResources.json' ,
@@ -235,4 +229,4 @@ describe('Validate test templates against VSCode language service', () => {
235229 expect ( result ) . to . deep . equal ( [ ] ) ;
236230 } ) ;
237231 }
238- } ) ;
232+ } ) ;
0 commit comments