DebugResponseSpec
The success response of a route, for the OpenAPI document: DebugRoute.response declares it. Its bodies, one for each content type, and its headers are in the order of the declarations.
Properties
The status of the response, 200 by default: a success status from 200 to 299, such as 201 for a route that creates an item. The document lists the response under it. A 204 or 205 response has no body, so it declares no schema and no content, and its handler answers with an empty body, such as DebugResponse.ok("", status = 204): a client such as OkHttp refuses a 204 with a body.
Functions
Adds a body of contentType that the JSON Schema schema describes. contentType is a media type, such as text/csv, or a media range with * as the subtype, for any image, or as both parts, for a body of any type. The default schema, {}, takes any body.