File tree Expand file tree Collapse file tree
java/com/webfuzzing/overlayjvm
resources/custom/query-examples Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,4 +49,12 @@ public String toString() {
4949 '}' ;
5050 }
5151 }
52+
53+ public static Data getDataFromName (String name ){
54+ return new Data (
55+ "/" +name +"/" +name +"-openapi.yaml" ,
56+ "/" +name +"/" +name +"-overlay.yaml" ,
57+ "/" +name +"/" +name +"-result.yaml"
58+ );
59+ }
5260}
Original file line number Diff line number Diff line change 1+ package com .webfuzzing .overlayjvm ;
2+
3+ import org .junit .jupiter .api .Disabled ;
4+ import org .junit .jupiter .params .ParameterizedTest ;
5+ import org .junit .jupiter .params .provider .MethodSource ;
6+
7+ import java .util .stream .Stream ;
8+
9+ //FIXME: https://github.com/noear/snackjson/issues/56
10+ @ Disabled
11+ public class ProcessorV1_1_0_customTest extends ProcessorTestBase {
12+
13+ public static Stream <Data > overlayProvider () {
14+
15+ return Stream .of (
16+ getDataFromName ("query-examples" )
17+ );
18+ }
19+
20+
21+ @ ParameterizedTest (name = "{0}" )
22+ @ MethodSource ("overlayProvider" )
23+ public void testOverlay (ProcessorTestBase .Data data ) throws Exception {
24+ verifyOverlay (data , "src/test/resources/custom" );
25+ }
26+ }
Original file line number Diff line number Diff line change 1+ openapi : 3.0.1
2+ info :
3+ title : OpenAPI definition
4+ version : v0
5+ servers :
6+ - url : http://localhost:8080
7+ description : Generated server url
8+ paths :
9+ /api/overlay :
10+ get :
11+ tags :
12+ - overlay-rest
13+ operationId : get
14+ parameters :
15+ - name : x
16+ in : query
17+ required : true
18+ schema :
19+ type : string
20+ - name : y
21+ in : query
22+ required : true
23+ schema :
24+ type : string
25+ responses :
26+ " 200 " :
27+ description : OK
28+ content :
29+ " */* " :
30+ schema :
31+ type : string
32+ components : {}
Original file line number Diff line number Diff line change 1+ overlay : 1.1.0
2+ info :
3+ title : Add example to x parameter
4+ version : 1.0.0
5+ actions :
6+ - target : " $['paths']['/api/overlay']['get']['parameters'][?@.name=='x']"
7+ update :
8+ examples :
9+ foo :
10+ value : foo
Original file line number Diff line number Diff line change 1+ openapi : 3.0.1
2+ info :
3+ title : OpenAPI definition
4+ version : v0
5+ servers :
6+ - url : http://localhost:8080
7+ description : Generated server url
8+ paths :
9+ /api/overlay :
10+ get :
11+ tags :
12+ - overlay-rest
13+ operationId : get
14+ parameters :
15+ - name : x
16+ in : query
17+ required : true
18+ schema :
19+ type : string
20+ examples :
21+ foo :
22+ value : foo
23+ - name : y
24+ in : query
25+ required : true
26+ schema :
27+ type : string
28+ responses :
29+ " 200 " :
30+ description : OK
31+ content :
32+ " */* " :
33+ schema :
34+ type : string
35+ components : {}
You can’t perform that action at this time.
0 commit comments