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.
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prismadoc",
3
- "version": "1.0.40",
3
+ "version": "1.0.42",
4
4
  "description": "Auto generates ApiProperties from schema.prisma",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",