Skip to content

Conversation

kuntal1461
Copy link
Contributor


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 fixes an issue where Validation Meta annotations were not being correctly recognized by the ModelResolver.

Problem

When developers use composed validation annotations (for example, a custom @MyNotBlank built on top of @NotBlank), swagger-core failed to introspect these Meta annotations, causing validation metadata to be lost in generated models.

Solution

Enhanced ModelResolver to introspect and apply Meta annotations properly.
A new test class ComposedConstraintMetaAnnotationTest verifies correct handling of composed constraint annotations.

Fixes: #4886


Type of Change

  • 🐛 Bug fix
  • 🧪 Tests

Checklist


Screenshots / Additional Context

  • Verified that composed constraint annotations are now detected and applied.

  • No regressions in direct annotation handling.

  • Affected files:

    • modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/ModelResolver.java
    • modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/ComposedConstraintMetaAnnotationTest.java

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.

Validation Meta annotations not working

1 participant