2 Object.defineProperty(exports, "__esModule", { value: true });
3 const shared = (root) => {
5 nullable: { type: "boolean" },
8 union: { elements: { ref: "schema" } },
10 additionalProperties: true,
14 sch.definitions = { values: { ref: "schema" } };
17 const emptyForm = (root) => ({
18 optionalProperties: shared(root),
20 const refForm = (root) => ({
22 ref: { type: "string" },
24 optionalProperties: shared(root),
26 const typeForm = (root) => ({
44 optionalProperties: shared(root),
46 const enumForm = (root) => ({
48 enum: { elements: { type: "string" } },
50 optionalProperties: shared(root),
52 const elementsForm = (root) => ({
54 elements: { ref: "schema" },
56 optionalProperties: shared(root),
58 const propertiesForm = (root) => ({
60 properties: { values: { ref: "schema" } },
63 optionalProperties: { values: { ref: "schema" } },
64 additionalProperties: { type: "boolean" },
68 const optionalPropertiesForm = (root) => ({
70 optionalProperties: { values: { ref: "schema" } },
73 additionalProperties: { type: "boolean" },
77 const discriminatorForm = (root) => ({
79 discriminator: { type: "string" },
83 union: [propertiesForm(false), optionalPropertiesForm(false)],
88 optionalProperties: shared(root),
90 const valuesForm = (root) => ({
92 values: { ref: "schema" },
94 optionalProperties: shared(root),
96 const schema = (root) => ({
105 optionalPropertiesForm,
108 ].map((s) => s(root)),
111 const jtdMetaSchema = {
113 schema: schema(false),
117 exports.default = jtdMetaSchema;
118 //# sourceMappingURL=jtd-schema.js.map