diff --git a/packages/dashmate/configs/schema/configJsonSchema.js b/packages/dashmate/configs/schema/configJsonSchema.js index 33712f8fcd0..595548b39f1 100644 --- a/packages/dashmate/configs/schema/configJsonSchema.js +++ b/packages/dashmate/configs/schema/configJsonSchema.js @@ -23,6 +23,7 @@ module.exports = { minLength: 1, }, build: { + type: 'object', properties: { path: { type: ['string', 'null'], @@ -59,6 +60,7 @@ module.exports = { additionalProperties: false, }, abciLogFile: { + type: 'object', properties: { level: { type: 'string', @@ -297,13 +299,16 @@ module.exports = { additionalProperties: false, }, abci: { + type: 'object', properties: { docker: { $ref: '#/definitions/dockerBuild', }, log: { + type: 'object', properties: { stdout: { + type: 'object', properties: { level: { $ref: '#/definitions/abciLogFile/properties/level', @@ -339,6 +344,7 @@ module.exports = { required: ['docker', 'log', 'validatorSet'], }, tenderdash: { + type: 'object', properties: { docker: { $ref: '#/definitions/docker', @@ -458,6 +464,7 @@ module.exports = { type: 'object', properties: { contract: { + type: 'object', properties: { id: { type: ['string', 'null'], @@ -483,6 +490,7 @@ module.exports = { type: 'object', properties: { contract: { + type: 'object', properties: { id: { type: ['string', 'null'], @@ -504,6 +512,7 @@ module.exports = { type: 'object', properties: { contract: { + type: 'object', properties: { id: { type: ['string', 'null'], diff --git a/packages/dashmate/package.json b/packages/dashmate/package.json index 52d13a01b40..f99ea1d27e1 100644 --- a/packages/dashmate/package.json +++ b/packages/dashmate/package.json @@ -59,7 +59,8 @@ "@oclif/config": "^1.17.0", "@oclif/errors": "^1.3.4", "@oclif/plugin-help": "^3.2.2", - "ajv": "^6.12.3", + "ajv": "^8.6.0", + "ajv-formats": "^2.1.1", "awilix": "^4.2.6", "bls-signatures": "^0.2.5", "chalk": "^4.0.0", diff --git a/packages/dashmate/src/config/Config.js b/packages/dashmate/src/config/Config.js index 9ba7550e421..d08bb4efce3 100644 --- a/packages/dashmate/src/config/Config.js +++ b/packages/dashmate/src/config/Config.js @@ -4,6 +4,7 @@ const lodashGet = require('lodash.get'); const lodashSet = require('lodash.set'); const lodashCloneDeep = require('lodash.clonedeep'); +const addFormats = require('ajv-formats'); const configJsonSchema = require('../../configs/schema/configJsonSchema'); const convertObjectToEnvs = require('./convertObjectToEnvs'); @@ -172,5 +173,6 @@ class Config { } Config.ajv = new Ajv({ coerceTypes: true }); +addFormats(Config.ajv, { mode: 'fast', formats: ['ipv4'] }); module.exports = Config;