Commit 78bd3a51 authored by nanahira's avatar nanahira

fix required field

parent 47da8a85
......@@ -36,7 +36,7 @@ function swaggerDecorator(
) {
return ApiProperty({
default: options.default,
required: options.required && options.default == null,
required: !!(options.required && options.default == null),
example: options.default,
description: options.description,
...injected,
......@@ -192,6 +192,9 @@ export const NotColumn = (
): PropertyDecorator =>
MergePropertyDecorators([
Exclude(),
swaggerDecorator(options),
swaggerDecorator({
required: false,
...options,
}),
Metadata.set('notColumn', true, 'notColumnFields'),
]);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment