Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setup: function (schema) {
return new jlib.cores.Draft04(schema);
},
test: function (instance, json, schema) {
const Core = require("json-schema-library").cores.JsonEditor;
const copy = require("./utils/copy");
const jsl = require("json-schema-library");
const getChildSchemaSelection = require("json-schema-library").getChildSchemaSelection;
/**
* Manages json-schema interactions and adds caching of reoccuring json-schema requests
*
* @param {Object} schema - json-schema
* @param {Object} [data={}] - data corresponding to json-schema
* @param {Core} [core={}] - instance of json-schema-library Core
*/
class SchemaService {
constructor(schema = {}, data = {}, core = new Core()) {
this.core = core;
const gp = require("gson-pointer");
const Core = require("json-schema-library").cores.JsonEditor;
const addValidator = require("json-schema-library/lib/addValidator");
const DataService = require("./services/DataService");
const SchemaService = require("./services/SchemaService");
const ValidationService = require("./services/ValidationService");
const LocationService = require("./services/LocationService");
const State = require("./services/State");
const selectEditor = require("./utils/selectEditor");
const _createElement = require("./utils/createElement");
const addItem = require("./utils/addItem");
const UISchema = require("./utils/UISchema");
const getID = require("./utils/getID");
const plugin = require("./plugin");
const i18n = require("./utils/i18n");
function isValidPointer(pointer) {
const mitt = require("mitt");
const Core = require("json-schema-library").cores.JsonEditor;
const State = require("./State");
const ActionCreators = require("./reducers/actions").ActionCreators;
const errorReducer = require("./reducers/errorReducer");
const Validation = require("./utils/Validation");
const BubblingCollectionObservable = require("./utils/BubblingCollectionObservable");
const EVENTS = {
BEFORE_VALIDATION: "beforeValidation",
AFTER_VALIDATION: "afterValidation",
ON_ERROR: "onError"
};
/**
* @class ValidationService