nest-prisma_doc-gen 1.0.6 → 1.0.8
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.
|
@@ -42,7 +42,7 @@ export class DocGenDto {
|
|
|
42
42
|
this.classValidators.add("IsEnum");
|
|
43
43
|
this.imports.add(`import { ${Array.from(this.enums)} } from '../enums';`);
|
|
44
44
|
}
|
|
45
|
-
this.imports.add(`import { ${Array.from(this.classValidators)} } from '
|
|
45
|
+
this.imports.add(`import { ${Array.from(this.classValidators)} } from 'src/utils/validators';`);
|
|
46
46
|
return [
|
|
47
47
|
`${Array.from(this.imports).join("\n")}`,
|
|
48
48
|
`export class ${this.name}Dto {
|
package/dist/entities/field.js
CHANGED
|
@@ -116,7 +116,12 @@ export class DocGenField {
|
|
|
116
116
|
else if (this.scalarField.type === "String") {
|
|
117
117
|
props.push(`example: 'ordinary string'`);
|
|
118
118
|
}
|
|
119
|
-
|
|
119
|
+
if (this.type === "object") {
|
|
120
|
+
props.push(`additionalProperties: true`);
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
props.push(`required: ${this.scalarField.isRequired}`);
|
|
124
|
+
}
|
|
120
125
|
return props;
|
|
121
126
|
}
|
|
122
127
|
sanitizeValidators() {
|
package/dist/utils/helpers.js
CHANGED