swagger-api / swagger-api/swagger-codegen
Java template uses an removed method(DeserializationContext.mappingException(String))
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
In modules/swagger-codegen/src/main/resources/javaSpring/CustomInstantDeserializer.mustache:Line 203:
throw context.mappingException("Expected type float, integer, or string.");
The com.fasterxml.jackson.databind.DeserializationContext.mappingException(String) is an expired method and has been romoved in jackson-databind:2.16.0.(Swagger-codegen depends on jackson-databind-2.17.0 & CVE-2023-35116 Vulnerabilitiy reported in jackson-databind up to 2.16)
Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open modules/swagger-codegen/src/main/resources/javaSpring/CustomInstantDeserializer.mustache and inspect line 203 and its use of DeserializationContext.mappingException(String). Compare that call with the supported Jackson API, update the template, and verify that generated Java output builds with jackson-databind 2.17.0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100