One of my APIs has a 204 response defined, but the ApiResponse itself seems to always type data as an object, even though in this case it can be undefined.
This is what my operation responses look like:
responses: {
200: {
content: {
"application/json": components["schemas"]["Region"];
};
};
202: {
content: {
"application/json": components["schemas"]["Region"];
};
};
204: never;
};
But the data property is typed as Region
, rather than Region | undefined
.