The issue is that I have a complex Object as Request Param for a GET-Request and after I place the Swagger Annotations inside the Object. The Swagger UI shows that the entry param is a body in which i have to place the Params.
body: {
"modelId": 0,
"makeId": 0
}
My REST controller looks like this
@RequestMapping(method = RequestMethod.GET, value = "/model")
public SearchModelsResponse searchModels(
@ApiParam(value = "Search for something",
required = true) final ModelSearch search) {...}
And the Request object
public class ModelSearch {
@ApiParam(value = "Something important)", required = true)
private Long modelId;
@ApiParam(value = "Something else important)", required = false)
@Nullable
private Long makeId;
....
}
Is there a Way to Annotate it correctly so Swagger shows it as correctly as Request Parameters and not as a body construct ?