response
- response(code: int | str, t: type = None, contentType: str = 'application/json', description: str = None, headers: dict[str, Header | type] = None) Callable
Indicates a potential response of a request handler method. A response definition may or may not define a response payload using
tandcontentType.- Parameters:
code (int) – REQUIRED. An HTTP Status Code, such as
200, or429.t (type) – If a payload should be expected in the response, this indicates the type of the payload to expect.
contentType (str) – If a response payload is expected, this indicates the
Content-Typeof that payload. Default is"application/json".description (str) – An optional description for the expected content.