Closed owenizedd closed 2 months ago
Hi @owenizedd
Try to remove content: {}
:
const streamJSONRoute = createRoute({
method: 'get',
path: '/',
tags: ['Read'],
request: {},
responses: {
200: {
description: 'Stream JSON'
}
}
})
In the current Zod OpenAPI, if the content
property exists, it requires TypeResponse
, not Response
.
Thanks I forgot to mention it does work :)
Background:
responses
Code:
Above code will result ts compiler compains on line:
content: {} as Promise<Response>,
:If I make createRoute's responses to be
responses: {}
the router will compain: