You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use @anatine/zed-openapi alongside @anatine/zed-nestjs to create a Dto for a query parameter as such:
constfindManyUsersFilterSchema=extendApi(z.strictObject({name: z.string(),email: z.string().email()}),{title: 'Find Many Users Query Filters',description: 'The filters to apply when finding many users'})exportclassFindManyUsersFilterDtoextendscreateZodDto(findManyUsersFilterSchema){}
This Dto is meant to be used for validating a query parameter, but when I try to execute the request via the Swagger UI, it serializes the parameters in a unexpected way.
I understand that, using the @ApiQuery decorator from @nestjs/swagger, I can change the style of the query params serialization to 'deepObject', but I can't seem to do so using @anatine/zod-openapi. Is there any way to do so currently?
The text was updated successfully, but these errors were encountered:
Greetings,
I'm trying to use
@anatine/zed-openapi
alongside@anatine/zed-nestjs
to create a Dto for a query parameter as such:Example usage:
This Dto is meant to be used for validating a query parameter, but when I try to execute the request via the Swagger UI, it serializes the parameters in a unexpected way.
Expected:
/users?filters[name]=foo&filters[email]=bar
Actual:
/users?name=foo&email=bar
I understand that, using the
@ApiQuery
decorator from@nestjs/swagger
, I can change the style of the query params serialization to 'deepObject', but I can't seem to do so using@anatine/zod-openapi
. Is there any way to do so currently?The text was updated successfully, but these errors were encountered: