Skip to content

Conversation

@jasper-vandemalle
Copy link
Contributor

Finding and registering modules can avoid exceptions like the following:

Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Java 8 date/time type `java.time.OffsetDateTime` not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling (through reference chain: org.openapitools.openapidiff.core.model.ChangedOpenApi["changedOperations"]->java.util.ArrayList[0]->org.openapitools.openapidiff.core.model.ChangedOperation["oldOperation"]->io.swagger.v3.oas.models.Operation["responses"]->io.swagger.v3.oas.models.responses.ApiResponses["default"]->io.swagger.v3.oas.models.responses.ApiResponse["content"]->io.swagger.v3.oas.models.media.Content["application/json"]->io.swagger.v3.oas.models.media.MediaType["schema"]->io.swagger.v3.oas.models.media.Schema["properties"]->java.util.LinkedHashMap["someDateTime"]->io.swagger.v3.oas.models.media.DateTimeSchema["example"])
	at com.fasterxml.jackson.databind.exc.InvalidDefinitionException.from(InvalidDefinitionException.java:77)
	at com.fasterxml.jackson.databind.SerializerProvider.reportBadDefinition(SerializerProvider.java:1300)
	at com.fasterxml.jackson.databind.ser.impl.UnsupportedTypeSerializer.serialize(UnsupportedTypeSerializer.java:35)
...
	at com.fasterxml.jackson.databind.ObjectMapper.writeValueAsString(ObjectMapper.java:3821)
	at org.openapitools.openapidiff.core.output.JsonRender.render(JsonRender.java:22)

@gitpod-io
Copy link

gitpod-io bot commented Sep 27, 2022

@jasper-vandemalle
Copy link
Contributor Author

@joschi would you be able to review / move this PR along?

@joschi joschi added the bug label Oct 24, 2022
@joschi joschi added this to the 2.1.0 milestone Oct 24, 2022
Copy link
Contributor

@joschi joschi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jasper-vandemalle Thanks for your contribution!

@joschi joschi merged commit 22eb95f into OpenAPITools:master Oct 24, 2022
@jasper-vandemalle jasper-vandemalle deleted the object-mapper-modules branch October 25, 2022 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants