Originally posted by **epotter2297** October 11, 2022
It would be really cool if there was a way to use zod to validate my path parameters. For example, if I have an endpoint like so:
```js
{
method: 'get',
path: '/users/:id',
alias: 'getUser',
description: 'Get a user',
response: z.object({
id: z.number(),
name: z.string().nullable(),
}),
},
```
And I want to make sure that `id` is a valid UUID, I could do something like:
```js
{
method: 'get',
path: '/users/:id',
alias: 'getUser',
description: 'Get a user',
parameters: [
{
name: 'id',
description: 'The user id',
type: 'Path',
schema: z.string().uuid(),
},
],
response: z.object({
id: z.number(),
name: z.string().nullable(),
}),
},
```
Discussed in https://github.com/ecyrbe/zodios/discussions/176