typescript-rest-swagger icon indicating copy to clipboard operation
typescript-rest-swagger copied to clipboard

Return.NoResponse is inserting 204 No Content on swagger

Open NicholasKuchiniski opened this issue 3 years ago • 0 comments

When using Return.NoResponse (https://github.com/thiagobustamante/typescript-rest/wiki/Service-Return#no-response) the generated swagger contains a 204 status with no description, when in fact it shouldn't add any status at all since I'm documenting the returns with the @Response decorator and using the @ContextResponse to directly send the result to express.

The expected behavior should be: when I get a return of type return.NoResponse the library should not add anything to the swagger.

I think the problem is probably the file methodGenerator.ts the method generate should get a method that returns if type is NoResponse, and then, whe should use this method on controllerGenerator.ts if the method returns true, whe should return false for the filter.

NicholasKuchiniski avatar Nov 25 '21 16:11 NicholasKuchiniski