json-schema-to-joi
Version:
Converts JSON schema to Joi typescript code
16 lines (15 loc) • 470 B
TypeScript
import * as prettier from 'prettier';
import { JSONSchema4 } from 'json-schema';
import { OpenAPIV3 } from 'openapi-types';
export interface ResolveOptions {
useDeprecatedJoi?: boolean;
useExtendedJoi?: boolean;
rootSchema?: JSONSchema4 | Partial<OpenAPIV3.Document>;
}
export interface FormatOptions {
joiName?: string;
extendedJoiName?: string;
withExport?: boolean;
prettierOptions?: prettier.Options;
withTypeDeclaration?: boolean;
}