-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Property of type IFormFile is nullable even with NotEmpty rule #131
Comments
Hi Rami |
Thank you. As a work-around, I created a document processor for NSwag:
In Startup.cs:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi.
If I have an action which accepts a model decorated with
FromForm
which contains a property of typeIFormFile
which has aNotEmpty
rule, the OpenAPI schema is generated and unexpectedly hasnullable: true
on that property.I expected the property to not be nullable because of the
NotEmpty
rule.It may be related to #24
See #130
The unit test in
IFormFileTests
passes successfully, but when I view the swagger UI or generated swagger.json of theUploadFile
action inSampleNSwagWebApi
,nullable
is set to true.Thank you.
The text was updated successfully, but these errors were encountered: