Below are the 2 RequestMapping handler methods in my rest controller with the same value but different param.
@ApiOperation(value = "Query with name", nickname = "queryWithNameParam")
@RequestMapping(value = "/query", params = "name",
method = RequestMethod.GET)
public void queryWithNameParam()
@ApiOperation(value = "Query with code", nickname = "queryWithCodeParam")
@RequestMapping(value = "/query", params = "code",
method = RequestMethod.GET)
public void queryWithCodeParam()
I am able to invoke both the methods using resttemplate, but the API is not being shown on the browser when accessing swagger-ui.html
I am using springboot 2.0.3.RELEASE and springfox 2.9.2
Now there is only one option to fix this:
Add springfox-swagger-ui-rfc6570
instead of springfox-swagger-ui
as a dependency.
Set enableUrlTemplating(true)
in your docket configuration.
Open issues in springfox Github project:
Closed issues: