swagger-inflector icon indicating copy to clipboard operation
swagger-inflector copied to clipboard

Feature request: Boxing ResponseContext<T> type

Open cbornet opened this issue 9 years ago • 0 comments

It would be useful to be able to do something like:

    public ResponseContext<Pet> getPetById(RequestContext request , Long petId) {
        return new ResponseContext<Pet>(new Pet(), Status.OK);
    }

This way you can both control the http response fields and have type coercition (which you don't have with the current ResponseContext). Kind of like Spring-MVC's ResponseEntity class.

cbornet avatar Oct 19 '16 14:10 cbornet