@poseidat/schemas
Version:
The core schemas for the PoseiDAT data interchange formats
16 lines • 597 B
TypeScript
import { ErrorObject } from 'ajv';
import { JSONSchema7 } from 'json-schema';
import { ICoreBaseEntry, ICoreJournal } from './schema-types';
/**
* Validate a single object with a provided schema
*
* @export
* @param {*} object The object to validate
* @param {*} schema The JSON schema to use for validation. Defaults to journal schema
* @returns {Ajv.ErrorObject[]}
*/
export declare function validateSchema({ object, schema }: {
object: Record<string, unknown> | ICoreJournal | ICoreBaseEntry;
schema: JSONSchema7;
}): ErrorObject[];
//# sourceMappingURL=schema-validator.d.ts.map