-
-
Notifications
You must be signed in to change notification settings - Fork 529
JsonMappingException on UI render #630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Same issue here when upgrading from 1.3.4 to 1.3.6 |
@jasonab and @abadurczyk, If you are reporting a bug, please help to speed up problem diagnosis by providing as much information as possible:
|
Null key for a Map not allowed in JSON (use a converting NullKeySerializer?) (through reference chain: io.swagger.v3.oas.models.OpenAPI["paths"]->io.swagger.v3.oas.models.Paths["/"]->io.swagger.v3.oas.models.PathItem["get"]->io.swagger.v3.oas.models.Operation["responses"]->io.swagger.v3.oas.models.responses.ApiResponses["null"]) |
Is it the same issue with v1.3.7, which integrates some enhancements?
|
This ticket will be closed, and there is no need to reopen a new ticket for the same issue. |
Yes we tested it and it plays. My example:
Thanks for the reply. |
This comment was marked as abuse.
This comment was marked as abuse.
Your issue is unable to reproduce... If you are reporting a bug, please help to speed up problem diagnosis by providing as much information as possible: As mentionned before,
|
Version 1.3.7 does not fix it. How to reproduce:
Controller:
Errorhandler:
Exception:
I hope you can fix it with these infos and thanks for your help :) |
The cause is that on the exception handler there is no @ResponseStatus. @ControllerAdvice(assignableTypes = HelloController.class)
public class FooErrorHandler {
@ExceptionHandler
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
public ResponseEntity<String> storeAssignmentPublishingError(Exception e) {
return new ResponseEntity<>("foo", HttpStatus.INTERNAL_SERVER_ERROR);
}
} Anyway, the fix is now added to master, to ignore the ExceptionHandler if ResponseStatus is absent. |
Using version 1.3.6
Describe the bug
When trying to render /swagger-ui.html, receive the following error:
There was an unexpected error (type=Internal Server Error, status=500).
com.fasterxml.jackson.databind.JsonMappingException: Null key for a Map not allowed in JSON (use a converting NullKeySerializer?) (through reference chain: io.swagger.v3.oas.models.OpenAPI["paths"]->io.swagger.v3.oas.models.Paths["/keywordGroups/{groupName}"]->io.swagger.v3.oas.models.PathItem["get"]->io.swagger.v3.oas.models.Operation["responses"]->io.swagger.v3.oas.models.responses.ApiResponses["null"])
Expected behavior
Page would render Swagger documentation
I've removed all Swagger annotations from the code in question, leaving only Spring REST-oriented annotations, but cannot seem to get past this error. The method in question returns a ResponseEntity object, if that might matter.
I've also tried adding a full set of @operation + @ApiResponse objects, but it does not get rid of this error.
The text was updated successfully, but these errors were encountered: