Commit 9521d8d
authored
Adding NotNull annotation for required fields (#810)
* NotNull annotation added for required field (even when the field has no other constraint).
* Update BeanValidationTest.java
getFields method returns only `public` fields and the generated class consists only of private ones.
It makes ValidatedObject.class.getFields() always returning an empty array.
Following assertion has no chance to fail
assertThat(Arrays.stream(UnvalidatedObject.class.getFields())
.noneMatch(f -> f.isAnnotationPresent(NotNull.class))).isTrue();1 parent 246fa51 commit 9521d8d
File tree
3 files changed
+9
-4
lines changed- client
- deployment/src/main/resources/templates/libraries/microprofile
- integration-tests/bean-validation/src
- main/openapi
- test/java/io/quarkiverse/openapi/generator/it
3 files changed
+9
-4
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| 62 | + | |
| 63 | + | |
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
| |||
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | | - | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
89 | | - | |
| 91 | + | |
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
| |||
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
98 | | - | |
| 100 | + | |
0 commit comments