diff --git a/src/swagger/api-paginated-query.decorator.ts b/src/swagger/api-paginated-query.decorator.ts index 6f13996..094b7cc 100644 --- a/src/swagger/api-paginated-query.decorator.ts +++ b/src/swagger/api-paginated-query.decorator.ts @@ -144,6 +144,7 @@ function SearchBy(paginateConfig: PaginateConfig) { ${li('Available Fields', paginateConfig.searchableColumns)} `, required: false, + isArray: true, type: 'string', }) } diff --git a/src/swagger/pagination-docs.spec.ts b/src/swagger/pagination-docs.spec.ts index 3345a8b..646be6a 100644 --- a/src/swagger/pagination-docs.spec.ts +++ b/src/swagger/pagination-docs.spec.ts @@ -226,7 +226,10 @@ describe('PaginatedEndpoint decorator', () => { description: 'List of fields to search by term to filter result values\n

\n Example: name\n

\n

\n Default Value: By default all fields mentioned below will be used to search by term\n

\n

Available Fields

\n ', schema: { - type: 'string', + type: 'array', + items: { + type: 'string', + }, }, }, {