Just like RestResponses, RestResultType is a typeclass that defines how an OpenAPI
Responses Object will look like for a HTTP method which returns given type. The difference between
RestResultType and RestResponses is that RestResultType is defined for full result
type which usually is some kind of asynchronous wrapper over actual result type (e.g. Future).
In such situation, RestResponses must be provided for T while RestResultType is provided
for Future[T] (or whatever async wrapper is used), based on the RestResponses instance of T.
You can see an example of this in FutureRestImplicits.
Just like RestResponses, RestResultType is a typeclass that defines how an OpenAPI Responses Object will look like for a HTTP method which returns given type. The difference between RestResultType and RestResponses is that RestResultType is defined for full result type which usually is some kind of asynchronous wrapper over actual result type (e.g.
Future
). In such situation, RestResponses must be provided forT
while RestResultType is provided forFuture[T]
(or whatever async wrapper is used), based on the RestResponses instance ofT
. You can see an example of this in FutureRestImplicits.RestResultType for OpenApiMetadata is analogous to HttpResponseType for RestMetadata.