-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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(crd-generator): Add support for more validation constraints #6447
Draft
baloo42
wants to merge
10
commits into
fabric8io:main
Choose a base branch
from
baloo42:feature/iss_5868
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+953
−15
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
baloo42
changed the title
feat(crd-generator): Add support for more validation constratins
feat(crd-generator): Add support for more validation constraints
Oct 13, 2024
baloo42
requested review from
andreaTP,
metacosm,
manusa,
oscerd,
rohanKanojia and
shawkins
as code owners
October 13, 2024 15:39
baloo42
commented
Oct 15, 2024
...ator/test/src/test/java/io/fabric8/crd/generator/approvaltests/CRDGeneratorApprovalTest.java
Outdated
Show resolved
Hide resolved
11 tasks
baloo42
force-pushed
the
feature/iss_5868
branch
from
October 22, 2024 21:08
f567837
to
9133c71
Compare
baloo42
force-pushed
the
feature/iss_5868
branch
from
November 4, 2024 22:08
9133c71
to
9cf38e3
Compare
Quality Gate failedFailed conditions |
metacosm
approved these changes
Nov 7, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable to me.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #5836 (Add support for size constraints)
Fixes #5868 (Add support for exclusiveMinimum/exclusiveMaximum)
Add support for the following validation constraints:
@Min
and@Max
annotations@Size
annotation@Size
annotation@Size
annotationNotes:
@Size
will be detected on container types similar to@Pattern
and@Min/@Max
.@Min/@Max
and@Size
is now restricted to their intended types,e.g.
@Min/@Max
is only intended to be used on number types and not on strings.A boolean
inclusive
flag in the annotation, defaulting totrue
.TBD:
@Size
be detected on container types, if the type itself is a container?e.g.
List<@Size(min=1) List<@Size(min=2) String>>
@Min
/@Max
annotation has the wrong type for the value. It feels wrong that we are usingdouble
. Are there any plans or thoughts to tackle this?TODO:
Type of change
test, version modification, documentation, etc.)
Checklist