mirror of
https://github.com/drawdb-io/drawdb.git
synced 2026-02-12 02:00:40 +08:00
11 lines
301 B
JavaScript
11 lines
301 B
JavaScript
import { Validator } from "jsonschema";
|
|
import { ddbSchema, jsonSchema } from "../data/schemas";
|
|
|
|
export function jsonDiagramIsValid(obj) {
|
|
return new Validator().validate(obj, jsonSchema).valid;
|
|
}
|
|
|
|
export function ddbDiagramIsValid(obj) {
|
|
return new Validator().validate(obj, ddbSchema).valid;
|
|
}
|