I have a Spring Boot application with springfox-swagger-ui. I need to:
- Make Swagger UI display input field for a parameter that does not appear among the request handler params in my controller. For example, the request contains a
hashCodeparameter, which I verify with aHandlerInterceptorAdapterand then I don't need anymore, thus I don't list it among the request handler params. But I want to have it in Swagger UI. - Remove an input field from Swagger UI that corresponds to a parameter that I have in my request handler in my controller. For example, the request contains a
userId, which I use to construct anUserobject with aHandlerMethodArgumentResolverand then inject it into the request handler by adding a parameter of typeUser. Thus I don't want Swagger UI to createUserinput field, but instead auserIdinput field.
To summarize, I need to show an input field in Swagger UI that does not correspond to any request handler parameter, and I need to hide an input field in Swagger UI that corresponds to a request handler parameter. How to do this?