Add schema assertions on public methods of @0xproject/sol-compiler

This commit is contained in:
Leonid Logvinov
2018-05-24 16:33:58 -07:00
parent ed5b9c2b56
commit 549e6d57c4
4 changed files with 33 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
export const compilerOptionsSchema = {
id: '/CompilerOptions',
properties: {
contractsDir: { type: 'string' },
artifactsDir: { type: 'string' },
solcVersion: { type: 'string', pattern: '^d+.d+.d+$' },
compilerSettings: { type: 'object' },
contracts: {
oneOf: [
{
type: 'string',
pattern: '^\\*$',
},
{
type: 'array',
items: {
type: 'string',
},
},
],
},
},
type: 'object',
required: [],
additionalProperties: false,
};