Simple example:
export const example = base.prefix("/example").router({
example: base
.route({ path: "/" })
.output(
z.object({
body: z.object({
items: z.array(z.string()),
}),
}),
)
.handler(() => {
return {
body: { items: [] },
};
}),
});
The above example generates the following OpenAPI schema for its output:
"application/json": {
"schema": {
"type": "object",
"properties": { "items": { "type": "array" } },
"required": ["items"]
}
}
This is missing information about the elements of the array and seems to be a bug.
Thanks for your work on this library!
Simple example:
The above example generates the following OpenAPI schema for its output:
This is missing information about the elements of the array and seems to be a bug.
Thanks for your work on this library!