thiagobustamante / typescript-rest-swagger

Swagger tools for typescript-rest
156 stars 57 forks source link

Return.NoResponse is inserting 204 No Content on swagger #145

Open NicholasKuchiniski opened 2 years ago

NicholasKuchiniski commented 2 years ago

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.