ResponseDescription Type
A response an endpoint can give: its status code, the type of its body, if it has one, and what it means. As endpoint metadata, it is an IProducesResponseTypeMetadata, which ApiExplorer and OpenAPI generators read.
Record fields
| Record Field |
Description
|
The type of the response's body, if it has one.
|
|
Full Usage:
ContentTypes
Field type: string list
|
The content types of the body.
|
Full Usage:
Description
Field type: string option
|
What the response means, such as "No order has the id".
|
Full Usage:
StatusCode
Field type: int
|
The status code of the response.
|
Static members
| Static member |
Description
|
Full Usage:
ResponseDescription.Empty(statusCode, ?description)
Parameters:
int
-
The status code of the response
?description : string
-
What the response means
Returns: ResponseDescription
|
A response without a body.
|
Full Usage:
ResponseDescription.Json(statusCode, bodyType, ?description)
Parameters:
int
-
The status code of the response
bodyType : Type
-
The type of the body
?description : string
-
What the response means
Returns: ResponseDescription
|
A response with a JSON body of type bodyType.
|
Orsak