w3cj / stoker

Utilities for hono and @hono/zod-openapi
MIT License
129 stars 11 forks source link

In the IdParamsSchema is it possible to make them required #10

Open albertovasquez opened 2 weeks ago

albertovasquez commented 2 weeks ago

When generating / doc the params are not listed as required and my sdk generator breaks

-paths.For path parameter the required value should be true

Is this something we should expect stoker to do when using the idParamsSchema?

params: z.object({
      ...IdParamsSchema.shape,
      id: IdParamsSchema.shape.id.openapi({
        param: {
          required: true,
        },
      }),
    })

I know we can do the above just wanted to know if we wanted this in stoker

w3cj commented 3 days ago

Fixed in 1.4.1 - let me know if this works for you.