Forum Discussion

Ramu's avatar
Ramu
New Contributor
5 years ago

How to remove/hide body parameter from Swagger UI in file upload API

Hello, I'm newbie to swagger UI development using jersey framework. I'm looking out for the resolution for below mentioned issue. Issue: Unable to remove/hide body parameter from Swagger UI P...
  • RonRatovsky's avatar
    5 years ago

    You're using a very (very) old version of swagger-core. Please make sure to update to the latest, and follow the documentation to learn how to hide parameters.

  • Ramu's avatar
    Ramu
    5 years ago

    RonRatovsky - Thank you for your response. I have fixed the issue by doing below changes:

    1) Have changed the swagger maven dependency from "swagger-jaxrs" to "swagger-jersey2-jaxrs"

    2) Include "@ApiParam" swagger annotation with resource method parameter as "@ApiParam(hidden = true) @FormDataParam(value = "file") FormDataContentDisposition fileMetaData".

     
     

    Thanks, 🙂