File tree 9 files changed +106
-0
lines changed
openapi-processor-core/src/testInt
kotlin/io/openapiprocessor/core
9 files changed +106
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ class CompileExpectedSpec: StringSpec({
62
62
}
63
63
compilePaths.add(Path .of("src/testInt/resources/compile/Mapping .java"))
64
64
compilePaths.add(Path .of("src/testInt/resources/compile/Parameter .java"))
65
+ compilePaths.add(Path .of("src/testInt/resources/compile/Prefix .java"))
65
66
compilePaths.add(Path .of("src/testInt/resources/compile/jakarta/Constraint .java"))
66
67
compilePaths.add(Path .of("src/testInt/resources/compile/jakarta/ConstraintValidator .java"))
67
68
compilePaths.add(Path .of("src/testInt/resources/compile/jakarta/ConstraintValidatorContext .java"))
Original file line number Diff line number Diff line change @@ -79,6 +79,8 @@ val ALL_30: List<TestParams> = listOf(
79
79
test30_DR(" schema-composed-allof-ref-sibling" ),
80
80
test30_DR(" schema-composed-nested" ),
81
81
test30_DR(" schema-composed-oneof-interface" ),
82
+ // test30_DR("schema-duplicate-by-refs"), // not supported
83
+ test30_DR(" server-url" ),
82
84
test30_DR(" swagger-parsing-error" )
83
85
)
84
86
@@ -154,5 +156,7 @@ val ALL_31: List<TestParams> = listOf(
154
156
test31_DR(" schema-composed-allof-ref-sibling" ),
155
157
test31_DR(" schema-composed-nested" ),
156
158
test31_DR(" schema-composed-oneof-interface" ),
159
+ // test31_DR("schema-duplicate-by-refs"), // not supported
160
+ test31_DR(" server-url" ),
157
161
test31_DR(" swagger-parsing-error" )
158
162
)
Original file line number Diff line number Diff line change
1
+ package annotation ;
2
+
3
+ import java .lang .annotation .Documented ;
4
+ import java .lang .annotation .Retention ;
5
+ import java .lang .annotation .Target ;
6
+
7
+ import static java .lang .annotation .ElementType .TYPE ;
8
+ import static java .lang .annotation .RetentionPolicy .CLASS ;
9
+
10
+ @ Documented
11
+ @ Retention (CLASS )
12
+ @ Target ({TYPE })
13
+ public @interface Prefix {
14
+ String value ();
15
+ }
Original file line number Diff line number Diff line change
1
+ items :
2
+ - inputs/openapi30.yaml
3
+ - inputs/openapi31.yaml
4
+ - inputs/mapping.yaml
Original file line number Diff line number Diff line change
1
+ openapi-processor-mapping : v9
2
+
3
+ options :
4
+ package-name : generated
5
+ server-url : 0
6
+ format-code : false
Original file line number Diff line number Diff line change
1
+ openapi : 3.0.2
2
+ info :
3
+ title : test template
4
+ version : 1.0.0
5
+
6
+ servers :
7
+ - url : " {schema}://{host}:{port}/{path1}/{path2}/v{version}"
8
+ variables :
9
+ schema :
10
+ default : https
11
+ enum :
12
+ - https
13
+ - http
14
+ host :
15
+ default : openapiprocessor.io
16
+ port :
17
+ default : " 443"
18
+ path1 :
19
+ default : foo
20
+ path2 :
21
+ default : bar
22
+ version :
23
+ default : " 1"
24
+
25
+ paths :
26
+ /foo :
27
+ get :
28
+ responses :
29
+ ' 204 ' :
30
+ description : ...
Original file line number Diff line number Diff line change
1
+ openapi : 3.1.0
2
+ info :
3
+ title : test template
4
+ version : 1.0.0
5
+
6
+ servers :
7
+ - url : " {schema}://{host}:{port}/{path1}/{path2}/v{version}"
8
+ variables :
9
+ schema :
10
+ default : https
11
+ enum :
12
+ - https
13
+ - http
14
+ host :
15
+ default : openapiprocessor.io
16
+ port :
17
+ default : " 443"
18
+ path1 :
19
+ default : foo
20
+ path2 :
21
+ default : bar
22
+ version :
23
+ default : " 1"
24
+
25
+ paths :
26
+ /foo :
27
+ get :
28
+ responses :
29
+ ' 204 ' :
30
+ description : ...
Original file line number Diff line number Diff line change
1
+ items :
2
+ - outputs/api/Api.java
Original file line number Diff line number Diff line change
1
+ package generated .api ;
2
+
3
+ import annotation .Mapping ;
4
+ import annotation .Prefix ;
5
+ import generated .support .Generated ;
6
+
7
+ @ Generated (value = "openapi-processor-core" , version = "test" )
8
+ @ Prefix ("/foo/bar/v1" )
9
+ public interface Api {
10
+
11
+ @ Mapping ("/foo" )
12
+ void getFoo ();
13
+
14
+ }
You can’t perform that action at this time.
0 commit comments