@sebspark/openapi-typegen 1.7.2 → 1.7.3

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -650,7 +650,15 @@ var parsePropertyType = (property) => {
650
650
  return { type: "number", ...parseDocumentation(schemaObject) };
651
651
  }
652
652
  case "string": {
653
- return { type, ...parseDocumentation(schemaObject) };
653
+ switch (schemaObject.format) {
654
+ case "date":
655
+ case "date-time": {
656
+ return { type: "Date", ...parseDocumentation(schemaObject) };
657
+ }
658
+ default: {
659
+ return { type, ...parseDocumentation(schemaObject) };
660
+ }
661
+ }
654
662
  }
655
663
  default: {
656
664
  return { type, ...parseDocumentation(schemaObject) };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sebspark/openapi-typegen",
3
- "version": "1.7.2",
3
+ "version": "1.7.3",
4
4
  "license": "Apache-2.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",