Showing results for 
Search instead for 
Did you mean: 

Reference "file" type Parameter in Swagger V2.0

Occasional Visitor

Reference "file" type Parameter in Swagger V2.0

How to define a parameter of type file and in value 'formData' in Swagger V2.0, and use that reference in Operations? It works when the parameter is defined for each operation but not when its defined in parameters in the end and then referenced.


Re: Reference "file" type Parameter in Swagger V2.0

Hi pasundar,


$ref should work with parameters – check out the examples in the Common Parameters doc.


If you are still having issues, please post a link to your API definition. Or if your API is private, please add swaggerhub-support as a collaborator and send me the link via PM.

Helen Kosova
SmartBear Documentation Team Lead
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video: