You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenAPI supports describing response objects with status codes, status ranges, or using the default field (more in the specification).
The Default Response section of Describing Responses documentation (see here) states the following:
Sometimes, an operation can return multiple errors with different HTTP status codes, but all of them have the same response structure: (masked example section)
You can use the default response to describe these errors collectively, not individually. “Default” means this response is used for all HTTP codes that are not covered individually for this operation.
This issue was first introduced in #519 with the support of status codes, which was later also extended in #535 to support the status ranges. It is now only missing the support for the default object.
Type 'JSONRespondReturn<{ result: number; }, 400>' is not assignable to type 'MaybePromise<TypedResponse<any, 200, "json" | "text">>'.
Type 'JSONRespondReturn<{ result: number; }, 400>' is not assignable to type 'TypedResponse<any, 200, "json" | "text">'.
Types of property '_status' are incompatible.
Type '400' is not assignable to type '200'.ts(2345)
The text was updated successfully, but these errors were encountered:
OpenAPI supports describing response objects with status codes, status ranges, or using the
default
field (more in the specification).The
Default Response
section ofDescribing Responses
documentation (see here) states the following:This issue was first introduced in #519 with the support of status codes, which was later also extended in #535 to support the status ranges. It is now only missing the support for the default object.
Quick reproduction of an issue:
Typescript error for the example above:
The text was updated successfully, but these errors were encountered: