File tree Expand file tree Collapse file tree 14 files changed +54
-77
lines changed
src/main/java/org/example/myapp/web
src/main/java/org/example
src/test/java/org/example
src/main/java/org/example/myapp/web Expand file tree Collapse file tree 14 files changed +54
-77
lines changed Original file line number Diff line number Diff line change 13
13
* .Module
14
14
dependency-reduced-pom.xml
15
15
.DS_Store
16
+ tests /test-sigma /avaje-processors.txt
17
+ tests /test-sigma /io.avaje.jsonb.spi.JsonbExtension
Original file line number Diff line number Diff line change 43
43
</modules >
44
44
</profile >
45
45
</profiles >
46
+
47
+ <dependencies >
48
+ <dependency >
49
+ <groupId >io.avaje</groupId >
50
+ <artifactId >avaje-validator</artifactId >
51
+ <version >2.3</version >
52
+ </dependency >
53
+
54
+ <dependency >
55
+ <groupId >io.avaje</groupId >
56
+ <artifactId >avaje-validator-constraints</artifactId >
57
+ <version >2.3</version >
58
+ </dependency >
59
+
60
+ <dependency >
61
+ <groupId >io.avaje</groupId >
62
+ <artifactId >avaje-validator-generator</artifactId >
63
+ <version >2.3</version >
64
+ </dependency >
65
+
66
+ </dependencies >
46
67
47
68
</project >
Original file line number Diff line number Diff line change 54
54
<artifactId >swagger-annotations</artifactId >
55
55
<version >${swagger.version} </version >
56
56
</dependency >
57
-
58
- <dependency >
59
- <groupId >io.avaje</groupId >
60
- <artifactId >avaje-validator</artifactId >
61
- <version >2.3</version >
62
- </dependency >
63
-
64
- <dependency >
65
- <groupId >io.avaje</groupId >
66
- <artifactId >avaje-validator-constraints</artifactId >
67
- <version >2.3</version >
68
- </dependency >
69
-
57
+
70
58
<!-- java annotation processors -->
71
59
72
60
<dependency >
96
84
<scope >provided</scope >
97
85
</dependency >
98
86
99
- <dependency >
100
- <groupId >io.avaje</groupId >
101
- <artifactId >avaje-validator-generator</artifactId >
102
- <version >2.3</version >
103
- </dependency >
104
-
105
-
106
87
<!-- test dependencies -->
107
88
<dependency >
108
89
<groupId >io.avaje</groupId >
Original file line number Diff line number Diff line change 3
3
import java .util .List ;
4
4
import java .util .Set ;
5
5
6
- import org .jetbrains .annotations .NotNull ;
7
-
8
6
import io .avaje .http .api .Header ;
9
7
import io .avaje .http .api .Ignore ;
10
8
import io .avaje .http .api .QueryParam ;
11
9
import io .avaje .jsonb .Json ;
12
10
import io .avaje .validation .constraints .Email ;
11
+ import io .avaje .validation .constraints .NotNull ;
13
12
import io .avaje .validation .constraints .Size ;
14
13
import io .avaje .validation .constraints .Valid ;
15
14
Original file line number Diff line number Diff line change 60
60
<version >2.3</version >
61
61
</dependency >
62
62
63
- <dependency >
64
- <groupId >io.avaje</groupId >
65
- <artifactId >avaje-validator-constraints</artifactId >
66
- <version >2.3</version >
67
- </dependency >
68
-
69
63
<dependency >
70
64
<groupId >io.swagger.core.v3</groupId >
71
65
<artifactId >swagger-annotations</artifactId >
87
81
<version >${project.version} </version >
88
82
<scope >provided</scope >
89
83
</dependency >
90
-
91
- <dependency >
92
- <groupId >io.avaje</groupId >
93
- <artifactId >avaje-validator-generator</artifactId >
94
- <version >2.3</version >
95
- </dependency >
96
-
97
84
98
85
<!-- test dependencies -->
99
86
<dependency >
Original file line number Diff line number Diff line change 54
54
<version >${project.version} </version >
55
55
</dependency >
56
56
57
- <dependency >
58
- <groupId >io.avaje</groupId >
59
- <artifactId >avaje-http-hibernate-validator</artifactId >
60
- <version >3.5-RC3</version >
61
- </dependency >
62
-
63
57
<dependency >
64
58
<groupId >io.swagger.core.v3</groupId >
65
59
<artifactId >swagger-annotations</artifactId >
Original file line number Diff line number Diff line change 1
1
package org .example ;
2
2
3
3
import io .avaje .http .api .ValidationException ;
4
- import io .avaje .http .api .Validator ;
5
4
import io .avaje .inject .BeanScope ;
6
- import io .avaje .inject .InjectModule ;
7
5
import io .avaje .jex .Jex ;
8
6
import io .avaje .jex .Routing ;
9
7
10
8
import java .util .LinkedHashMap ;
11
9
import java .util .Map ;
12
10
13
- @ InjectModule (requires = Validator .class )
14
11
public class Main {
15
12
16
13
public static void main (String [] args ) {
Original file line number Diff line number Diff line change 1
1
package org .example .web ;
2
2
3
- import jakarta . validation .Valid ;
4
- import jakarta . validation .constraints .NotNull ;
3
+ import io . avaje . validation .constraints . NotNull ;
4
+ import io . avaje . validation .constraints .Valid ;
5
5
6
6
@ Valid
7
7
public class HelloDto {
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
2
<projectDescription >
3
- <name >test-nima</name >
3
+ <name >test-nima-jsonb </name >
4
4
<comment ></comment >
5
5
<projects >
6
6
</projects >
Original file line number Diff line number Diff line change 33
33
<artifactId >avaje-jsonb</artifactId >
34
34
<version >2.3</version >
35
35
</dependency >
36
- <dependency >
37
- <groupId >io.avaje</groupId >
38
- <artifactId >avaje-http-hibernate-validator</artifactId >
39
- <version >3.3</version >
40
- </dependency >
41
36
<dependency >
42
37
<groupId >io.helidon.webserver</groupId >
43
38
<artifactId >helidon-webserver</artifactId >
92
87
<artifactId >avaje-jsonb-generator</artifactId >
93
88
<version >2.3</version >
94
89
</path >
90
+ <path >
91
+ <groupId >io.avaje</groupId >
92
+ <artifactId >avaje-validator-generator</artifactId >
93
+ <version >2.3</version >
94
+ </path >
95
95
</annotationProcessorPaths >
96
96
</configuration >
97
97
</plugin >
Original file line number Diff line number Diff line change 1
1
package org .example ;
2
2
3
- import io .avaje .http .api .Validator ;
3
+ import java .util .List ;
4
+ import java .util .Locale ;
5
+
4
6
import io .avaje .http .api .context .ThreadLocalRequestContextResolver ;
5
7
import io .avaje .http .client .HttpClient ;
6
- import io .avaje .http .hibernate .validator .BeanValidator ;
7
8
import io .avaje .jsonb .Jsonb ;
9
+ import io .avaje .validation .http .BeanValidator ;
8
10
import io .helidon .webserver .WebServer ;
9
11
import io .helidon .webserver .http .HttpRouting ;
10
12
@@ -38,7 +40,7 @@ void stop() {
38
40
private static HttpRouting .Builder routing () {
39
41
HttpRouting .Builder routing = HttpRouting .builder ();
40
42
41
- var beanValidator = new BeanValidator ();
43
+ var beanValidator = new BeanValidator (List . of ( Locale . getDefault ()) );
42
44
Jsonb jsonb = Jsonb .builder ().build ();
43
45
44
46
var ec = new ErrorController ();
Original file line number Diff line number Diff line change 42
42
<artifactId >avaje-http-api</artifactId >
43
43
<version >${project.version} </version >
44
44
</dependency >
45
-
46
- <dependency >
47
- <groupId >io.avaje</groupId >
48
- <artifactId >avaje-http-hibernate-validator</artifactId >
49
- <version >3.5-RC3</version >
50
- </dependency >
51
-
45
+
52
46
<dependency >
53
47
<groupId >io.swagger.core.v3</groupId >
54
48
<artifactId >swagger-annotations</artifactId >
Original file line number Diff line number Diff line change 7
7
import io .avaje .http .api .Ignore ;
8
8
import io .avaje .http .api .QueryParam ;
9
9
import io .avaje .jsonb .Json ;
10
- import jakarta . validation .Valid ;
11
- import jakarta . validation .constraints .Email ;
12
- import jakarta . validation .constraints .NotNull ;
13
- import jakarta . validation .constraints .Size ;
10
+ import io . avaje . validation .constraints . Email ;
11
+ import io . avaje . validation .constraints .NotNull ;
12
+ import io . avaje . validation .constraints .Size ;
13
+ import io . avaje . validation .constraints .Valid ;
14
14
15
15
@ Json
16
16
@ Valid
Original file line number Diff line number Diff line change 2
2
3
3
import java .time .LocalDate ;
4
4
5
- import org .hibernate .validator .constraints .URL ;
6
-
7
5
import io .avaje .jsonb .Json ;
8
- import jakarta .validation .Valid ;
9
- import jakarta .validation .constraints .Email ;
10
- import jakarta .validation .constraints .Future ;
11
- import jakarta .validation .constraints .NotNull ;
12
- import jakarta .validation .constraints .Size ;
6
+ import io .avaje .validation .constraints .Email ;
7
+ import io .avaje .validation .constraints .Future ;
8
+ import io .avaje .validation .constraints .NotNull ;
9
+ import io .avaje .validation .constraints .Size ;
10
+ import io .avaje .validation .constraints .URI ;
11
+ import io .avaje .validation .constraints .Valid ;
13
12
14
13
@ Json
15
14
@ Valid
@@ -22,10 +21,11 @@ public class HelloForm {
22
21
@ Email
23
22
@ Size (max = 100 )
24
23
String email ;
25
- @ URL
26
- private String url ;
27
- @ Future
28
- public LocalDate startDate ;
24
+
25
+ @ URI
26
+ private String url ;
27
+ @ Future
28
+ public LocalDate startDate ;
29
29
30
30
public HelloForm (String name , String email ) {
31
31
this .name = name ;
You can’t perform that action at this time.
0 commit comments