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
On error, I want to return no content from my API. I am trying to achieve like this (Picked up example from the demo), I have added 'content' to 400 as Void.class:
default ResponseEntity<Pet> getPetById(
@Parameter(description = "ID of pet to return", required = true) @PathVariable("petId") Long petId) {
return getDelegate().getPetById(petId);
}
`
In First Hit, it shows: Empty response for 400 response code.
If you hit swagger endpoint again, it will start showing up the Pet body again as response to 400.
The text was updated successfully, but these errors were encountered:
On error, I want to return no content from my API. I am trying to achieve like this (Picked up example from the demo), I have added 'content' to 400 as Void.class:
`@Operation(summary = "Find pet by ID", description = "Returns a single pet", security = {
@securityrequirement(name = "api_key") }, tags = { "pet" })
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "successful operation", content = @content(schema = @Schema(implementation = Pet.class))),
@ApiResponse(responseCode = "400", description = "Invalid ID supplied", content = @content(schema = @Schema(implementation = Void.class))),
`
In First Hit, it shows: Empty response for 400 response code.
If you hit swagger endpoint again, it will start showing up the Pet body again as response to 400.
The text was updated successfully, but these errors were encountered: