diff --git a/src/generators/plain.ts b/src/generators/plain.ts index 1a313ba..9f1990d 100644 --- a/src/generators/plain.ts +++ b/src/generators/plain.ts @@ -112,11 +112,15 @@ export function stringifyPlain( if (!field.isRequired) { stringifiedType = wrapWithNullable(stringifiedType); - if (isInputModelCreate || isInputModelUpdate) { + if (isInputModelCreate) { stringifiedType = wrapWithOptional(stringifiedType); } } + if (isInputModelUpdate) { + stringifiedType = wrapWithOptional(stringifiedType); + } + return `${field.name}: ${stringifiedType}`; }) .filter((x) => x) as string[];