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 675b86a commit 4d84e0bCopy full SHA for 4d84e0b
packages/jsii-spec/lib/validate-assembly.ts
@@ -6,7 +6,8 @@ export const schema: jsonschema.Schema = require('../schema/jsii-spec.schema.jso
6
7
export function validateAssembly(obj: any): Assembly {
8
const validator = new jsonschema.Validator();
9
- const result = validator.validate(obj, schema);
+ validator.addSchema(schema); // For definitions
10
+ const result = validator.validate(obj, schema, { nestedErrors: true } as any); // nestedErrors does exist but is not in the TypeScript definitions
11
if (result.valid) { return obj; }
12
throw new Error(`Invalid assembly:\n${result}`);
-}
13
+}
0 commit comments