Skip to content

feat: add support for Positive, PositiveOrZero, Negative, and NegativeOrZero constraints in model validation#5044

Closed
NaMinhyeok wants to merge 1 commit intoswagger-api:masterfrom
NaMinhyeok:bug/5035-jakarta-constraints
Closed

feat: add support for Positive, PositiveOrZero, Negative, and NegativeOrZero constraints in model validation#5044
NaMinhyeok wants to merge 1 commit intoswagger-api:masterfrom
NaMinhyeok:bug/5035-jakarta-constraints

Conversation

@NaMinhyeok
Copy link
Copy Markdown

@NaMinhyeok NaMinhyeok commented Jan 26, 2026

Description

  • Add support for Bean Validation sign constraints: @positive, @PositiveOrZero, @Negative, @NegativeOrZero.
  • Map them to OpenAPI schema bounds (minimum/maximum + exclusive*).

Fixes: #5035

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

@daniel-kmiecik
Copy link
Copy Markdown
Collaborator

@NaMinhyeok after reviewing the current state of the codebase, we're closing this PR as the underlying logic has since been reworked and the approach here is no longer applicable to the current code. The fix has been implemented in #5162

Thank you so much for taking the time to look into this!
Contributions like this are exactly what keep open source moving forward!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Jakarta @Positive validation is not present in Swagger

3 participants