[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
NicholasKuchiniski opened this issue Nov 25, 2021 · 0 comments
Open

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

NicholasKuchiniski opened this issue Nov 25, 2021 · 0 comments

Comments

@NicholasKuchiniski
Copy link
NicholasKuchiniski commented Nov 25, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant