We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28f3422 commit 7a06124Copy full SHA for 7a06124
src/generators/plain.ts
@@ -127,7 +127,7 @@ export function stringifyPlain(
127
stringifiedType = wrapWithNullable(stringifiedType);
128
}
129
130
- if (isInputModelUpdate) {
+ if (isInputModelUpdate || (isInputModelCreate && !field.isRequired && !field.hasDefaultValue)) {
131
stringifiedType = wrapWithOptional(stringifiedType);
132
madeOptional = true;
133
0 commit comments