springfox/springfox-demos

[bug-test] PathVariable & RequestParam bug - easily testable

SimpleCookie opened this issue · 1 comments

@RequestMapping(value = "/category/{id}/map", method = RequestMethod.POST)

Would this code still work if the URL /map were removed from the path?
So that "/category/{id}/map" becomes "/category/{id}"
Because I have this issue locally on my project that if:

  • I have a PathVariable
  • I have a RequestParam
  • Don't have anything after my PathVariable in the path.

But it works if I just add anything after the PathVariable.
Can someone confirm this? I couldn't get this project to run on my local machine due to security certificates at my organisation.

Changing enableUrlTemplating(true) to enableUrlTemplating(false) in the SwaggerConfig seem to have resolved the issue. Which was the template part of the following path '/api/apple/{id}{?fruit}'. Not sure if it's intentional like this or not.