You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@BrianSetz I suspect this may be a bug with Swagger UI not handling the type: [ string, "null" ] in OAS 3.1.0. Can you try it with an OAS 3.0.x output? It can be generated by setting the following property.
As far as I can tell, this is because Swagger UI is only supporting a string value [1] for type (not an array as is the result in OAS 3.1 for a nullable file). It may be worth opening an issue (or commenting on an existing issue if there is one) to improve support for this scenario when OpenAPI 3.1 is being used. The link below is for the oas3 request body component. I do not see a separate oas31 component, which would probably be the place to start.
I am observing some unexpected behaviour for nullable (meaning optional) File and Fileuploads.
File (upload button):
File? (without upload button):
File? (with schema workaround):
The behaviour works as expected for nullable Ints and Strings, but it breaks for nullable Files and FileUploads (potentially others too?).
I would expect a nullable File(Upload) to have upload buttons just like non-nullable File(Upload).
The text was updated successfully, but these errors were encountered: