nest-prisma_doc-gen 1.0.4 → 1.0.5
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/entities/field.js +2 -1
- package/dist/utils/helpers.js +3 -0
- package/package.json +1 -1
package/dist/entities/field.js
CHANGED
|
@@ -88,6 +88,7 @@ export class DocGenField {
|
|
|
88
88
|
const fieldName = this.scalarField.name;
|
|
89
89
|
const props = [];
|
|
90
90
|
const scalarDbName = this.scalarField.dbName ?? "genericDbName";
|
|
91
|
+
console.log(this.scalarField);
|
|
91
92
|
if (this.isEntity) {
|
|
92
93
|
if (this.isList) {
|
|
93
94
|
props.push(`example: [generateExample(${this.type})]`);
|
|
@@ -102,7 +103,7 @@ export class DocGenField {
|
|
|
102
103
|
else if (helpers.isDate(this.scalarField)) {
|
|
103
104
|
props.push(`example: '2025-09-03T03:00:00.000Z'`);
|
|
104
105
|
}
|
|
105
|
-
else if (this.scalarField.isId || (this.scalarField.
|
|
106
|
+
else if (this.scalarField.isId || Helper.splitByUpperCase(this.scalarField.name).includes("Id")) {
|
|
106
107
|
props.push(`example: 'cmfxu4njg000008l52v7t8qze'`);
|
|
107
108
|
}
|
|
108
109
|
else if (this.scalarField.type === "Boolean") {
|
package/dist/utils/helpers.js
CHANGED