@composio/json-schema-to-zod 0.1.9 → 0.1.10-next.0

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 CHANGED
@@ -408,7 +408,7 @@ function parseObjectProperties(objectSchema, refs) {
408
408
  });
409
409
  const hasDefault = typeof propJsonSchema === "object" && propJsonSchema.default !== void 0;
410
410
  const required = Array.isArray(objectSchema.required) ? objectSchema.required.includes(key) : typeof propJsonSchema === "object" && propJsonSchema.required === true;
411
- const isOptional = !hasDefault && !required && !(typeof propJsonSchema === "object" && propJsonSchema.type === "object" && propJsonSchema.properties);
411
+ const isOptional = !hasDefault && !required;
412
412
  properties[key] = isOptional ? propZodSchema.optional() : propZodSchema;
413
413
  }
414
414
  return z14.object(properties);
package/dist/index.js CHANGED
@@ -372,7 +372,7 @@ function parseObjectProperties(objectSchema, refs) {
372
372
  });
373
373
  const hasDefault = typeof propJsonSchema === "object" && propJsonSchema.default !== void 0;
374
374
  const required = Array.isArray(objectSchema.required) ? objectSchema.required.includes(key) : typeof propJsonSchema === "object" && propJsonSchema.required === true;
375
- const isOptional = !hasDefault && !required && !(typeof propJsonSchema === "object" && propJsonSchema.type === "object" && propJsonSchema.properties);
375
+ const isOptional = !hasDefault && !required;
376
376
  properties[key] = isOptional ? propZodSchema.optional() : propZodSchema;
377
377
  }
378
378
  return z14.object(properties);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@composio/json-schema-to-zod",
3
- "version": "0.1.9",
3
+ "version": "0.1.10-next.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -32,6 +32,7 @@
32
32
  "zod": "^3.24.2"
33
33
  },
34
34
  "scripts": {
35
+ "clean": "git clean -xdf node_modules",
35
36
  "build": "tsup",
36
37
  "test": "vitest run"
37
38
  },