prismadoc 1.0.40 → 1.0.42
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 +4 -1
- package/package.json +1 -1
package/dist/entities/field.js
CHANGED
|
@@ -98,7 +98,7 @@ export class DocGenField {
|
|
|
98
98
|
else if (this.kind === "scalar") {
|
|
99
99
|
if (this.scalarType === "Json") {
|
|
100
100
|
this.isJson = true;
|
|
101
|
-
this.type = "Prisma.InputJsonValue";
|
|
101
|
+
this.type = this.fieldType === "res" ? "Prisma.JsonValue" : "Prisma.InputJsonValue";
|
|
102
102
|
}
|
|
103
103
|
else {
|
|
104
104
|
this.type = Helper.prismaScalarToTs(this.scalarType);
|
|
@@ -151,6 +151,9 @@ export class DocGenField {
|
|
|
151
151
|
}
|
|
152
152
|
else {
|
|
153
153
|
props.push(`required: ${this.scalarField.isRequired}`);
|
|
154
|
+
if (!this.scalarField.isRequired) {
|
|
155
|
+
props.push(`nullable: true`);
|
|
156
|
+
}
|
|
154
157
|
}
|
|
155
158
|
return props;
|
|
156
159
|
}
|