Here is a simplified use case using swagger annotations 1.5.3 with springfox 2.2.2:
@ApiOperation(value = "Echos value", notes = "Echos value", tags="Testing")
@RequestMapping(method = RequestMethod.GET,
value = "/hello",
produces = { APPLICATION_HAL_JSON, MediaType.APPLICATION_JSON_VALUE }
)
String getXY(@ApiParam(name = "message", required = true)
@RequestParam(name = "page", required = true) String message) {
return "Hello " + message;
}
That generates
"/api/hello{?message}": {
"get":
This query params syntax "{?message}" is not supported by swagger ui 2.2.2.
From reading the swagger spec I got the impression, that only "path variables" are allowed, not "query param variables".
IMHO the path should read "/api/hello" in this case.
Opinions?
Cal
Here is a simplified use case using swagger annotations 1.5.3 with springfox 2.2.2:
That generates
This query params syntax "{?message}" is not supported by swagger ui 2.2.2.
From reading the swagger spec I got the impression, that only "path variables" are allowed, not "query param variables".
IMHO the path should read "/api/hello" in this case.
Opinions?
Cal