I have written a swagger ui for a GET request that doesn't need a request body. I haven't used the @RequestBody
annotation so why is Swagger bringing up a request body field on the ui? Even if I leave it empty, it is causing my API requests to fail with the following error: TypeError: Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot have body.
I understand why this error exists, the curl
that swagger creates has a -d
option. But how can I switch this off?
The only annotations I've used are @Get
, @Path
, @Operation
, @ApiResponses
, and @Parameters
.
Put simply, how can I tell swagger that I don't need a request body?