Skip to content

Commit

Permalink
fix: updated searchBy definition to array instead of string (#870)
Browse files Browse the repository at this point in the history
vaidas-dutrys authored Feb 16, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 76a0604 commit 9d4049b
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/swagger/api-paginated-query.decorator.ts
Original file line number Diff line number Diff line change
@@ -144,6 +144,7 @@ function SearchBy(paginateConfig: PaginateConfig<any>) {
${li('Available Fields', paginateConfig.searchableColumns)}
`,
required: false,
isArray: true,
type: 'string',
})
}
5 changes: 4 additions & 1 deletion src/swagger/pagination-docs.spec.ts
Original file line number Diff line number Diff line change
@@ -226,7 +226,10 @@ describe('PaginatedEndpoint decorator', () => {
description:
'List of fields to search by term to filter result values\n <p>\n <b>Example: </b> name\n </p>\n <p>\n <b>Default Value: </b> By default all fields mentioned below will be used to search by term\n </p>\n <h4>Available Fields</h4><ul><li>name</li></ul>\n ',
schema: {
type: 'string',
type: 'array',
items: {
type: 'string',
},
},
},
{

0 comments on commit 9d4049b

Please # to comment.