Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

31 lignes
839 B

  1. /**
  2. * @fileoverview The instance of Ajv validator.
  3. * @author Evgeny Poberezkin
  4. */
  5. "use strict";
  6. //------------------------------------------------------------------------------
  7. // Requirements
  8. //------------------------------------------------------------------------------
  9. const Ajv = require("ajv"),
  10. metaSchema = require("ajv/lib/refs/json-schema-draft-04.json");
  11. //------------------------------------------------------------------------------
  12. // Public Interface
  13. //------------------------------------------------------------------------------
  14. const ajv = new Ajv({
  15. meta: false,
  16. validateSchema: false,
  17. missingRefs: "ignore",
  18. verbose: true,
  19. schemaId: "auto"
  20. });
  21. ajv.addMetaSchema(metaSchema);
  22. // eslint-disable-next-line no-underscore-dangle
  23. ajv._opts.defaultMeta = metaSchema.id;
  24. module.exports = ajv;