How to use the json-schema-library.cores function in json-schema-library

To help you get started, we’ve selected a few json-schema-library examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ebdrup / json-schema-benchmark / index.js View on Github external
setup: function (schema) {
			return new jlib.cores.Draft04(schema);
		},
		test: function (instance, json, schema) {
github sueddeutsche / editron / services / SchemaService.js View on Github external
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;
github sueddeutsche / editron / Controller.js View on Github external
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) {
github sueddeutsche / editron / services / ValidationService.js View on Github external
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

json-schema-library

Customizable and hackable json-validator and json-schema utilities for traversal, data generation and validation

MIT
Latest version published 4 months ago

Package Health Score

64 / 100
Full package analysis