UNPKG

juniper

Version:

ESM JSON Schema builder for static Typescript inference.

19 lines (18 loc) 464 B
import { AbstractSchema } from '../lib/schema.js'; export class NullSchema extends AbstractSchema { schemaType = 'null'; static create(options) { return new NullSchema(options); } toSchema(params) { const base = super.toSchema(params); if (params.openApi30) { delete base.type; base.enum = [ null ]; } return base; } } //# sourceMappingURL=null.js.map