Stone.js API
    Preparing search index...

    Build the response a route declared, from whatever its handler returned.

    A route already says what it is: its path, its method, what it accepts, what it answers with. Saying the last part on the route rather than on the method keeps the handler about the domain, and keeps one place to read when you want to know what an endpoint returns.

    @Get('/tasks/:id', { response: { type: 'json', status: 200 } })
    show (event: IncomingHttpEvent): Task { return this.tasks.find(event.get('id')) }

    A method decorator still wins. @JsonHttpResponse(201) produces the response itself, and something more specific than a route option must not be overruled by it: when the handler has already answered with a response, this steps aside entirely. The two forms are a choice, not a conflict.

    Index