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
Introduce a status code response record type to map default responses which is described in the OpenAPI specification.
Describe your problem(s)
With the introduction of StatusCodeClient, the response can be mapped to one of the StatusCodeResponse type - This is a union of predefined status code response records.
If there is a response with the status code which is not defined by the user, then that is mapped to an error - ApplicationResponseError and the response body and headers can be found in the details map of this particular error type.
But when we consider the OpenAPI specification, it is common to represent the multiple error response to a default status code response with a defined response body schema. Currently we cannot represent this directly in the client call. Users has to extract the error and get the error details to build the default response.
As a solution, we can introduce a new status code response record - DefaultStatusCodeResponse which can be used to map all the other status code responses which are not defined by the user.
Description:
Introduce a status code response record type to map
default responses
which is described in the OpenAPI specification.Describe your problem(s)
With the introduction of
StatusCodeClient
, the response can be mapped to one of theStatusCodeResponse
type - This is a union of predefined status code response records.If there is a response with the status code which is not defined by the user, then that is mapped to an error -
ApplicationResponseError
and the response body and headers can be found in the details map of this particular error type.But when we consider the OpenAPI specification, it is common to represent the multiple error response to a
default
status code response with a defined response body schema. Currently we cannot represent this directly in the client call. Users has to extract the error and get the error details to build thedefault
response.Describe your solution(s)
As a solution, we can introduce a new status code response record -
DefaultStatusCodeResponse
which can be used to map all the other status code responses which are not defined by the user.The text was updated successfully, but these errors were encountered: