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.
Source: http://springfox.github.io/springfox/docs/current/#springfox-rfc6570-support-strong-incubating-strong
Open issues in springfox Github project:
Closed issues:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With