-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Feature Description
Swagger-core currently contains a significant amount of boilerplate code (getters, setters, equals, hashCode, toString) in its model and utility classes.
This feature request proposes introducing a mechanism to reduce boilerplate and improve maintainability. One option is exploring Project Lombok (scoped as provided), or alternatively considering other strategies such as code generation or templates.
The aim is not to change runtime behavior but to make the codebase easier for contributors to maintain, and reduce the chance of inconsistencies in manually written methods.
Use Case
Contributors: Adding new fields or modifying model classes would be less error-prone and require fewer lines of repetitive code.
Maintainers: Smaller diffs in PRs, fewer manual methods to review, and easier long-term maintenance.
Community: New contributors onboarding into swagger-core would spend less time on boilerplate and more on logic/bug fixes.
✅ Benefits
Reduced boilerplate → smaller diffs, easier reviews.
Less risk of manual mistakes in equals/hashCode.
Faster iteration for contributors.
❓ Questions for maintainers
Would the project be open to Lombok in any capacity (even if limited)?
If not Lombok, would you consider other boilerplate-reduction strategies?
Should we explicitly document the “no Lombok” stance in the contribution guide to avoid confusion for new contributors?