File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 1+ import * as yamlParser from "js-yaml" ;
12import * as path from "path" ;
23import * as _ from "lodash" ;
34import * as fs from "fs" ;
Original file line number Diff line number Diff line change 1- import * as ncp from "ncp" ;
1+ import ncp from "ncp" ;
22import * as path from "path" ;
33import { promisify } from "util" ;
44
Original file line number Diff line number Diff line change @@ -5,13 +5,14 @@ import schema from "./schema";
55// @ts -ignore ajv typings not working
66import JsonSchema from "ajv" ;
77
8- export function validateSchema ( json : T . Tutorial ) {
8+ export function validateSchema ( json : any ) {
99 // validate using https://json-schema.org/
1010 const jsonSchema = new JsonSchema ( { allErrors : true , verbose : true } ) ;
1111 // support draft-07 of json schema
1212 jsonSchema . addMetaSchema ( require ( "ajv/lib/refs/json-schema-draft-07.json" ) ) ;
1313
14- const valid = jsonSchema . compile ( schema , json ) ;
14+ const validator = jsonSchema . compile ( schema ) ;
15+ const valid = validator ( json ) ;
1516
1617 if ( ! valid ) {
1718 // log errors
You can’t perform that action at this time.
0 commit comments