@ghentcdh/crouton-api 0.0.1-alpha.47 → 0.0.1-alpha.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +19 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2388,10 +2388,14 @@ var init_view_builder = __esm({
|
|
|
2388
2388
|
true
|
|
2389
2389
|
]));
|
|
2390
2390
|
const picked = schema.pick(mask);
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2391
|
+
try {
|
|
2392
|
+
return (0, import_zod22.toJSONSchema)(picked, {
|
|
2393
|
+
target: "draft-07",
|
|
2394
|
+
...jsonSchemaOpts
|
|
2395
|
+
});
|
|
2396
|
+
} catch {
|
|
2397
|
+
return void 0;
|
|
2398
|
+
}
|
|
2395
2399
|
}, "zodSchemaSource");
|
|
2396
2400
|
NON_NULL_TYPES = [
|
|
2397
2401
|
"object",
|
|
@@ -5061,10 +5065,17 @@ var dropNullableFromRequired2 = /* @__PURE__ */ __name((jsonSchema) => {
|
|
|
5061
5065
|
}, "dropNullableFromRequired");
|
|
5062
5066
|
function toJsonSchema(schema) {
|
|
5063
5067
|
if (isZodSchema(schema)) {
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
+
let jsonSchema;
|
|
5069
|
+
try {
|
|
5070
|
+
jsonSchema = (0, import_zod29.toJSONSchema)(schema, {
|
|
5071
|
+
target: "openApi3",
|
|
5072
|
+
...jsonSchemaOpts
|
|
5073
|
+
});
|
|
5074
|
+
} catch {
|
|
5075
|
+
return {
|
|
5076
|
+
type: "object"
|
|
5077
|
+
};
|
|
5078
|
+
}
|
|
5068
5079
|
dropNullableFromRequired2(jsonSchema);
|
|
5069
5080
|
return jsonSchema;
|
|
5070
5081
|
}
|