ePages-de / ePages-de/restdocs-api-spec
Deserialization Error after Upgrading Jackson Version from 2.17.2 to 2.18.2
- Dominant language
- Kotlin
- Stars
- 427
- Forks
- 116
- Avg merge
- 23h 54m
- Merged PRs (30d)
- 1
Description
After upgrading the Jackson version from 2.17.2 to 2.18.2, I'm encountering a deserialization error while running the openapi3 task in my build. The error occurs when Jackson attempts to deserialize a Schema object within a ResourceModel object.
The error message is as follows:
```
> Task :openapi3 FAILEDFAILURE: Build failed with an exception.*
What went wrong:
Execution failed for task ':openapi3'.>
com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `com.epages.restdocs.apispec.model.Schema` (although at least one Creator exists): cannot deserialize from Object value (no delegate- or property-based Creator)
at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 83, column: 7] (through reference chain: com.epages.restdocs.apispec.model.ResourceModel["response"]->com.epages.restdocs.apispec.model.ResponseModel["schema"])
```
It seems that Jackson is unable to deserialize the `Schema` class due to the lack of an appropriate creator, such as a `@JsonCreator` annotation or a no-argument constructor. This is causing the deserialization to fail.
**Expected behavior:**
The Schema class should be properly deserialized by Jackson, either using a no-argument constructor or a @JsonCreator annotation.
**Suggested fix:**
Ensure that the Schema class has a no-argument constructor or a @JsonCreator annotated constructor to allow proper deserialization.
Verify that the ePages library is compatible with Jackson 2.18.2 to prevent future compatibility issues
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.