@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/{chunk-PCQM7JIA.js → chunk-YVVAJA3T.js} +9 -7
- package/dist/{chunk-PCQM7JIA.js.map → chunk-YVVAJA3T.js.map} +1 -1
- package/dist/index.cjs +8 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/plugin.cjs +8 -6
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.js +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
package/dist/plugin.cjs
CHANGED
|
@@ -3524,7 +3524,14 @@ function mapTsTypeToOpenApi(tsType, fieldName) {
|
|
|
3524
3524
|
}
|
|
3525
3525
|
}
|
|
3526
3526
|
function getOpenApiType(propDef, fieldName) {
|
|
3527
|
-
|
|
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":
|