You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an @RestController that has a single endpoint:
//Endpoint within status-controller
@RequestMapping(value = "ping", method = {RequestMethod.HEAD, RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE)
public PingResponse ping(boolean deep) {
[...]
}
Note that this is missing an @RequestParam on the boolean parameter. When Springfox tries to render this, the output appears like this:
Note that the top of the page has the message "Finished Loading Resource Information. Rendering Swagger UI..." and there is an error in the console. The full error is as follows:
Also in this particular example, there are four controllers: cluster-controller, message-controller, status-controller, and test-controller. The endpoint above is inside of status-controller and it does not appear on the page. However, the next controller alphabetically, test-controller, also does not appear, with no indication about the source of the problem or that other controllers are prevented from displaying.
Adding @RequestParam to the endpoint parameter does solve this problem, but I believe that the current behavior should be addressed. I expect that either:
Swagger UI renders the endpoint properly, despite it missing @RequestParam (since it is an endpoint that is valid in Spring)
A more helpful error message appears in either my Java console or the Swagger UI to indicate that I need to add @RequestParam to my boolean parameter
Also, it would be really wonderful if a failure in one controller only prevents that one controller from appearing, rather than preventing all controllers alphabetically afterwards from appearing as well.
The text was updated successfully, but these errors were encountered:
@Thunderforge thanks for the detailed issue. It would be useful to also know what your swagger api-docs looks like.. the relevant snippet at least. You can find it @ ...../v2/api-docs
@Thunderforge Did a little bit of research sending in a boolean in the body is totally valid. So its a bug in swagger-ui and you may want to report it there. Specifically the following parameter should be supported.
Thanks for duplicating that. Where do I go to report that buggy swagger-ui? I am new to all this.
Also, do you still need my swagger api-docs? I was having trouble locating them. We are creating a war and I don't see an api-docs folder aside from inside to springfox jar itself.
I have an
@RestController
that has a single endpoint:Note that this is missing an
@RequestParam
on the boolean parameter. When Springfox tries to render this, the output appears like this:Note that the top of the page has the message "Finished Loading Resource Information. Rendering Swagger UI..." and there is an error in the console. The full error is as follows:
Also in this particular example, there are four controllers: cluster-controller, message-controller, status-controller, and test-controller. The endpoint above is inside of status-controller and it does not appear on the page. However, the next controller alphabetically, test-controller, also does not appear, with no indication about the source of the problem or that other controllers are prevented from displaying.
Adding
@RequestParam
to the endpoint parameter does solve this problem, but I believe that the current behavior should be addressed. I expect that either:@RequestParam
(since it is an endpoint that is valid in Spring)@RequestParam
to my boolean parameterAlso, it would be really wonderful if a failure in one controller only prevents that one controller from appearing, rather than preventing all controllers alphabetically afterwards from appearing as well.
The text was updated successfully, but these errors were encountered: