Stone.js API
    Preparing search index...

    What a route declares about its answer.

    @Get('/tasks', { response: { type: 'json', status: 200 } }) puts the shape of the answer where the rest of the endpoint is already described, instead of on the method. request and response are the two halves of the same sentence, which is why it carries that name.

    Every field is optional, and the defaults are the obvious ones: JSON, and 200 (or 302 for a redirect, 204 for no content). A method decorator such as @JsonHttpResponse(201) still wins, because it produces the response itself and the more specific statement should.

    interface DeclaredResponse {
        headers?: HeadersType;
        status?: number;
        type?: DeclaredResponseType;
    }
    Index
    headers?: HeadersType

    Headers to send with it.

    status?: number

    The status a successful answer carries. Also what the published contract documents.

    What kind of answer it is. Defaults to json.