osury 1.0.1 → 1.1.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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "osury",
3
3
  "type": "module",
4
4
  "description": "Generate ReScript types with Sury schemas from OpenAPI specifications",
5
- "version": "1.0.1",
5
+ "version": "1.1.0",
6
6
  "license": "MIT",
7
7
  "bin": {
8
8
  "osury": "bin/osury.mjs"
@@ -411,7 +411,9 @@ function buildParamsObjectJson(params) {
411
411
  if (match$2 === undefined) {
412
412
  return;
413
413
  }
414
- properties[match$1] = match$2;
414
+ let cleanSchema;
415
+ cleanSchema = typeof match$2 === "object" && match$2 !== null && !Array.isArray(match$2) ? Object.fromEntries(Object.entries(match$2).filter(param => param[0] !== "default")) : match$2;
416
+ properties[match$1] = cleanSchema;
415
417
  let match$3 = param["required"];
416
418
  let isRequired = match$3 === true;
417
419
  let pathRequired = location === "path";