@famgia/omnify-laravel 0.0.85 → 0.0.87

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
@@ -3599,7 +3599,14 @@ function mapTsTypeToOpenApi(tsType, fieldName) {
3599
3599
  }
3600
3600
  }
3601
3601
  function getOpenApiType(propDef, fieldName) {
3602
- if (fieldName.includes("email")) {
3602
+ switch (propDef.type) {
3603
+ case "Date":
3604
+ return { type: "string", format: "date" };
3605
+ case "DateTime":
3606
+ case "Timestamp":
3607
+ return { type: "string", format: "date-time" };
3608
+ }
3609
+ if (fieldName.includes("email") && !fieldName.endsWith("_at")) {
3603
3610
  return { type: "string", format: "email" };
3604
3611
  }
3605
3612
  if (fieldName.includes("password")) {
@@ -3618,11 +3625,6 @@ function getOpenApiType(propDef, fieldName) {
3618
3625
  return { type: "number" };
3619
3626
  case "Boolean":
3620
3627
  return { type: "boolean" };
3621
- case "Date":
3622
- return { type: "string", format: "date" };
3623
- case "DateTime":
3624
- case "Timestamp":
3625
- return { type: "string", format: "date-time" };
3626
3628
  case "Email":
3627
3629
  return { type: "string", format: "email" };
3628
3630
  case "UUID":