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

File upload parameter #1

Closed
alisherks opened this issue Oct 5, 2017 · 4 comments
Closed

File upload parameter #1

alisherks opened this issue Oct 5, 2017 · 4 comments

Comments

@alisherks
Copy link
Contributor

Please add the ability to annotate file parameter.

kamilmysliwiec pushed a commit that referenced this issue Dec 11, 2017
@QuestionAndAnswer
Copy link

I would like to develop this topic, because I'm thinking to help and create pull request.
I see couple of options here.

  1. Attach to @uploadedfile decorator and start parsing it's output. This might be not flexible enough. Someone might want to specify exact consumption type of redefine the name.
  2. Extend @ApiImplicitBody decorator with form data settings. This will be confusing, as we will try to redefine actual consumption type.
  3. Extend @ApiConsumes with multi part specific options. Declaration might be over complicated and will break SRP.
  4. Introduce generic @ApiRaw decorator which will consume raw swagger part as string, object (anything). Through this decorator it will be possible to close most of the corner cases, at least until perfect solution will be found.

For now, as there a lot of cases still, I prefer 4th option as it will cover every potential documentation request. It's far from being perfect, but it is good enough to solve business requirements more effectively than keeping swagger documentation up to date in several places.

It's said, that if your application using anything that is not supported by set of default decorators from swagger you are not able to use this module at all then.

@kamilmysliwiec
Copy link
Member

@ApiImplicitFile() is available now (v2.5.0)

@kamilmysliwiec
Copy link
Member

Btw, @ApiRaw() proposal sounds great as well

kamilmysliwiec pushed a commit that referenced this issue Mar 18, 2019
Fixing ts syntax compile errors and added fix for resolving external …
kamilmysliwiec pushed a commit that referenced this issue Jul 14, 2019
[hotfix]: Fix Issue with nest-router package.
@lock
Copy link

lock bot commented Apr 25, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants