Skip to content

Commit

Permalink
fix(notification-service): bulk notification fix for accepting array …
Browse files Browse the repository at this point in the history
…and showing the same in swagger (#88)

Signed-off-by: mayank <[email protected]>

Co-authored-by: samarpan-b <[email protected]>
  • Loading branch information
mayank-SFIN571 and samarpan-b authored Oct 30, 2020
1 parent 8f37477 commit 5d8ab0c
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ export class NotificationController {
[STATUS_CODE.OK]: {
description: 'Array of Notifications',
content: {
[CONTENT_TYPE.JSON]: {schema: getModelSchemaRef(Notification)},
[CONTENT_TYPE.JSON]: {
type: 'array',
items: getModelSchemaRef(Notification),
},
},
},
},
Expand All @@ -94,7 +97,10 @@ export class NotificationController {
@requestBody({
content: {
[CONTENT_TYPE.JSON]: {
schema: getModelSchemaRef(Notification, {exclude: ['id']}),
schema: {
type: 'array',
items: getModelSchemaRef(Notification, {exclude: ['id']}),
},
},
},
})
Expand Down

0 comments on commit 5d8ab0c

Please sign in to comment.