swagger-api / swagger-api/swagger-core
AnnotationsUtils should not rely on ObjectMapper
Open
Nobody has claimed this yet.
backlog
Feature
- Dominant language
- Java
- Stars
- 7.5k
- Forks
- 2.3k
- Avg merge
- 18h 1m
- Merged PRs (30d)
- 10
Description
It seems kind of weird to me that an ObjectMapper is used to clone the Model here because this can lead to issues if the ObjectMapper is configured differently (e.g. using Mixins) and might break expected behaviour.
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
Start in modules/swagger-core/src/main/java/io/swagger/v3/core/util/AnnotationsUtils.java around line 1718 and inspect how the Model is cloned. Determine how to avoid dependence on a differently configured ObjectMapper, then verify that cloning preserves the expected behavior without affected Mixins or other mapper configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100