The changes made on DTO level (in variable names, if any) in API-gateway should also be reflected all the way to the individual service where the actual parameters will be used for a db call or elsewhere.
Eg.: For the above DTO [GetAllConnectionsDto], the changes made for function [async getConnections] in [apps/api-gateway/src/connection/connection.controller.ts] would change the variable 'searchByText' to 'search'.
Hence the changes would be in following files:
[apps/api-gateway/src/connection/connection.controller.ts] and respective Dto 'GetAllConnectionsDto' in [apps/api-gateway/src/connection/dtos/get-all-connections.dto.ts]
[apps/api-gateway/src/connection/connection.service.ts] ans the respective interface 'IConnectionSearchCriteria' in [apps/api-gateway/src/interfaces/IConnectionSearch.interface.ts]
[apps/connection/src/connection.controller.ts] and the respective interface 'IFetchConnections' in [apps/connection/src/interfaces/connection.interfaces.ts]
[apps/connection/src/connection.service.ts] and the respective interface 'IConnectionSearchCriteria' in [apps/connection/src/interfaces/connection.interfaces.ts]
About
Current behavior
Here's an example
Expected behavior
Instead a better way would be to extend and make use of the already existing PaginationDto. So the above implementation would become something like:
Note