Skip to content

Commit

Permalink
fix(get-all): register type in OK Response swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
thatkookooguy committed Mar 31, 2022
1 parent 3999136 commit 676ec4e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/decorators/kb-get-all.decorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ export function KbGetAll<DbGenericType>(
return applyDecorators(
Get(path),
ApiOperation({ summary: options.summary || `Get all ${ model.name }s` }),
ApiOkResponse({ description: options.successDescription || `Return a list of all ${ model.name }s` }),
ApiOkResponse({
description: options.successDescription || `Return a list of all ${ model.name }s`,
type: model,
isArray: true
}),
options.neverFails ? noop : ApiNotFoundResponse({
description: `Failed to fetch all ${ model.name }`
}),
Expand Down

0 comments on commit 676ec4e

Please sign in to comment.