botbook/node_modules/json-schema-library/dist/lib/getTemplate.d.ts

17 lines
713 B
TypeScript
Raw Normal View History

2024-09-04 13:13:15 -03:00
import { JsonSchema } from "./types";
import { Draft } from "./draft";
export type TemplateOptions = {
/** Add all properties (required and optional) to the generated data */
addOptionalProps?: boolean;
/** Remove data that does not match input schema. Defaults to false */
removeInvalidData?: boolean;
/** Set to false to take default values as they are and not extend them.
* Defaults to true.
* This allows to control template data e.g. enforcing arrays to be empty,
* regardless of minItems settings.
*/
extendDefaults?: boolean;
};
declare const _default: (draft: Draft, data?: any, schema?: JsonSchema, opts?: TemplateOptions) => any;
export default _default;