@famgia/omnify-laravel 0.0.85 → 0.0.86

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.js CHANGED
@@ -24,7 +24,7 @@ import {
24
24
  schemaToBlueprint,
25
25
  toColumnName,
26
26
  toTableName
27
- } from "./chunk-PCQM7JIA.js";
27
+ } from "./chunk-YVVAJA3T.js";
28
28
  export {
29
29
  formatColumnMethod,
30
30
  formatForeignKey,
package/dist/plugin.cjs CHANGED
@@ -3524,7 +3524,14 @@ function mapTsTypeToOpenApi(tsType, fieldName) {
3524
3524
  }
3525
3525
  }
3526
3526
  function getOpenApiType(propDef, fieldName) {
3527
- if (fieldName.includes("email")) {
3527
+ switch (propDef.type) {
3528
+ case "Date":
3529
+ return { type: "string", format: "date" };
3530
+ case "DateTime":
3531
+ case "Timestamp":
3532
+ return { type: "string", format: "date-time" };
3533
+ }
3534
+ if (fieldName.includes("email") && !fieldName.endsWith("_at")) {
3528
3535
  return { type: "string", format: "email" };
3529
3536
  }
3530
3537
  if (fieldName.includes("password")) {
@@ -3543,11 +3550,6 @@ function getOpenApiType(propDef, fieldName) {
3543
3550
  return { type: "number" };
3544
3551
  case "Boolean":
3545
3552
  return { type: "boolean" };
3546
- case "Date":
3547
- return { type: "string", format: "date" };
3548
- case "DateTime":
3549
- case "Timestamp":
3550
- return { type: "string", format: "date-time" };
3551
3553
  case "Email":
3552
3554
  return { type: "string", format: "email" };
3553
3555
  case "UUID":