Skip to content

Commit 363a4b5

Browse files
committed
fix(example-todo-list): make foreign key optional in request body
1 parent 946de02 commit 363a4b5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

examples/todo-list/src/controllers/todo-list-todo.controller.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ export class TodoListTodoController {
4141
@requestBody({
4242
content: {
4343
'application/json': {
44-
schema: getModelSchemaRef(Todo, {exclude: ['id']}),
44+
schema: getModelSchemaRef(Todo, {
45+
exclude: ['id'],
46+
optional: ['todoListId'],
47+
}),
4548
},
4649
},
4750
})

0 commit comments

Comments
 (0)