fix: add so that the Java Deprecated annotation is considered a processable annotation type by Mattias-Sehlstedt · Pull Request #5099 · swagger-api/swagger-core (original) (raw)
Pull Request
Thank you for contributing to swagger-core!
Please fill out the following information to help us review your PR efficiently.
Description
This PR re-adds so that the @Deprecated Java annotation is considered a valid "processable" annotation within the project. This change made it so that deprecated was dropped.
The background for why it can be dropped is because this project itself does not currently handle @Deprecated on properties, but I would agree with #4840 and claim that this project is a suitable place to handle it within.
The main issue with the change that dropped the annotation is that there exists projects that want to handle it themselves, for example springdoc as highlighted here. So to please everyone I would argue that it would be beneficial to reintroduce it.
I was unable to find an annotation that had TYPE as target given the project's language level. Thus why the "ignores JDK annotation"-test is not kept.
Fixes: #5043 (and springdoc/springdoc-openapi#3250)
Type of Change
- 🐛 Bug fix
- ✨ New feature
- ♻️ Refactor (non-breaking change)
- 🧪 Tests
- 📝 Documentation
- 🧹 Chore (build or tooling)
Checklist
- I have added/updated tests as needed
- I have added/updated documentation where applicable
- The PR title is descriptive
- The code builds and passes tests locally
- I have linked related issues (if any)