Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow to use constraints from jakarta namespace for Java and Kotlin models #2073

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

tomdevroomen
Copy link
Contributor

@tomdevroomen tomdevroomen commented Jul 19, 2024

feat: Allow to use constraints from jakarta namespace for Java and Kotlin models

Description

The JAVA_CONSTRAINT_PRESET uses constraints from the javax namespace.
Since Java 17 the constraints are moved to the jakarta namespace. Add an options to the JAVA_CONSTRAINT_PRESET to use the jakarta namespace for constraint imports.

Related Issue

fixes: #1807

Checklist

  • The code follows the project's coding standards and is properly linted (npm run lint).
  • Tests have been added or updated to cover the changes.
  • Documentation has been updated to reflect the changes.
  • All tests pass successfully locally.(npm run test).

Additional Notes

Nothing to add from my side.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

Copy link

netlify bot commented Jul 19, 2024

Deploy Preview for modelina canceled.

Name Link
🔨 Latest commit 903edac
🔍 Latest deploy log https://app.netlify.com/sites/modelina/deploys/669a2f15b59836000826fea3

@tomdevroomen tomdevroomen changed the title feat: Allow to use contraints from jakarta namespace for Java and Kotlin models feat: Allow to use constraints from jakarta namespace for Java and Kotlin models Jul 19, 2024
…tlin models

Description
The JAVA_CONSTRAINT_PRESET uses constraints from the javax namespace.
Since Java 17 the constraints are moved to the jakarta namespace.
Add an options to the JAVA_CONSTRAINT_PRESET to use the jakarta namespace for constraint imports.

Related issue
fixes: (asyncapi#1807)[asyncapi#1807]
@tomdevroomen tomdevroomen force-pushed the java-jakarta-constraints branch from f742073 to 903edac Compare July 19, 2024 09:17
@tomdevroomen tomdevroomen changed the title feat: Allow to use constraints from jakarta namespace for Java and Kotlin models feat: allow to use constraints from jakarta namespace for Java and Kotlin models Jul 19, 2024
@coveralls
Copy link

Pull Request Test Coverage Report for Build 10005675656

Details

  • 39 of 41 (95.12%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 92.314%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/generators/java/presets/ConstraintsPreset.ts 37 39 94.87%
Totals Coverage Status
Change from base Build 9982250941: 0.01%
Covered Lines: 6002
Relevant Lines: 6333

💛 - Coveralls

Copy link
Member

@jonaslagoni jonaslagoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome @tomdevroomen 👍

@jonaslagoni
Copy link
Member

/rtm

@asyncapi-bot asyncapi-bot merged commit e7e6033 into asyncapi:master Jul 19, 2024
18 of 20 checks passed
@jonaslagoni
Copy link
Member

@all-contributors please add @tomdevroomen for code, example, docs, test

Copy link
Contributor

@jonaslagoni

I've put up a pull request to add @tomdevroomen! 🎉

@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 3.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Java output - Using jakarta.validation.constraints instead of javax.validation.constraints
4 participants