Skip to content

fix: add so that the Java Deprecated annotation is considered a processable annotation type#5099

Open
Mattias-Sehlstedt wants to merge 2 commits intoswagger-api:masterfrom
Mattias-Sehlstedt:consider-deprecated-for-annotated-type
Open

fix: add so that the Java Deprecated annotation is considered a processable annotation type#5099
Mattias-Sehlstedt wants to merge 2 commits intoswagger-api:masterfrom
Mattias-Sehlstedt:consider-deprecated-for-annotated-type

Conversation

@Mattias-Sehlstedt
Copy link
Copy Markdown
Contributor

@Mattias-Sehlstedt Mattias-Sehlstedt commented Mar 26, 2026

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 is that there exists projects that want to handle this 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)

Screenshots / Additional Context

@Mattias-Sehlstedt Mattias-Sehlstedt force-pushed the consider-deprecated-for-annotated-type branch from b136c63 to 0124121 Compare March 26, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: AnnotatedType equality in ModelConverterContextImpl

1 participant