-
Notifications
You must be signed in to change notification settings - Fork 475
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
"headers" property for responses is not generated in swagger #170
Comments
I believe the answer is to use the As for declaring it in Swagger... I actually don’t know (I just recently joined as a maintainer). So I’ll mark this issue as [help wanted] so that maybe someone can either:
My apologies for the delay in answering. We have new, additional maintainers who will be adding more support in the future. |
Currently i am working in a completely different environment, and don't have time to follow up on this. Just saying so you know i won't be able to test or do anything here. |
Up, this is still relevant today. const stat: fs.Stats = await fs.promises.stat(filePath);
this.setStatus(200);
this.setHeader('Content-Type', 'application/pdf');
this.setHeader('Content-Length', stat.size.toString()); |
We can't guess how you set the headers at runtime. Closing this in favor of #770 |
Hi,
we are trying to use tsoa to generate a swagger specification for our API. We are running into several issues, here is one of them.
There are other issues here on github regarding the use of custom headers in responses. From what i have understood it is now possible to set custom headers, and this works fine for the generated routes.
But for the generated swagger, there is simply no way of getting the headers property created for responses right?
kind regards,
Thomas
The text was updated successfully, but these errors were encountered: