diff --git a/src/controller/cve.controller/cve.middleware.js b/src/controller/cve.controller/cve.middleware.js index f0e8be597..bdac42f50 100644 --- a/src/controller/cve.controller/cve.middleware.js +++ b/src/controller/cve.controller/cve.middleware.js @@ -8,7 +8,7 @@ const cnaContainerSchema = JSON.parse(fs.readFileSync('src/middleware/schemas/5. const logger = require('../../middleware/logger') const Ajv = require('ajv') const addFormats = require('ajv-formats') -const ajv = new Ajv({ allErrors: true }) +const ajv = new Ajv({ allErrors: false, multipleOfPrecision: 6 }) addFormats(ajv) const validateRejected = ajv.compile(RejectedSchema) const validateCnaContainer = ajv.compile(cnaContainerSchema) diff --git a/src/model/cve.js b/src/model/cve.js index 07ce5e26c..eed0b2867 100644 --- a/src/model/cve.js +++ b/src/model/cve.js @@ -6,7 +6,7 @@ const cveSchemaV5 = JSON.parse(fs.readFileSync('src/middleware/schemas/CVE_JSON_ const Ajv = require('ajv') const addFormats = require('ajv-formats') -const ajv = new Ajv({ allErrors: true }) +const ajv = new Ajv({ allErrors: false, multipleOfPrecision: 6, verbose: true }) addFormats(ajv) const validate = ajv.compile(cveSchemaV5) const getConstants = require('../constants').getConstants