Forum Discussion

pasundar's avatar
pasundar
Occasional Visitor
6 years ago

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.

1 Reply

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    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.