File tree Expand file tree Collapse file tree 6 files changed +143
-2
lines changed
groovy/com/github/hauner/openapi/processor Expand file tree Collapse file tree 6 files changed +143
-2
lines changed Original file line number Diff line number Diff line change @@ -20,14 +20,14 @@ import org.junit.Ignore
20
20
import org.junit.runner.RunWith
21
21
import org.junit.runners.Parameterized
22
22
23
- @Ignore
23
+ // @Ignore
24
24
@RunWith (Parameterized )
25
25
class ProcessorPendingTest extends ProcessorTestBase {
26
26
27
27
@Parameterized.Parameters (name = " {0}" )
28
28
static Collection<TestSet > sources () {
29
29
return [
30
- new TestSet (name : ' response-content-multiple ' )
30
+ new TestSet (name : ' ref-loop ' )
31
31
]
32
32
}
33
33
Original file line number Diff line number Diff line change
1
+ /*
2
+ * This class is auto generated by https://github.com/hauner/openapi-generatr-spring.
3
+ * DO NOT EDIT.
4
+ */
5
+
6
+ package generated .api ;
7
+
8
+ import generated .model .Foo ;
9
+ import generated .model .Self ;
10
+ import org .springframework .http .ResponseEntity ;
11
+ import org .springframework .web .bind .annotation .GetMapping ;
12
+
13
+ public interface Api {
14
+
15
+ @ GetMapping (
16
+ path = "/self-reference" ,
17
+ produces = {"application/json" })
18
+ ResponseEntity <Self > getSelfReference ();
19
+
20
+ @ GetMapping (
21
+ path = "/nested-self-reference" ,
22
+ produces = {"application/json" })
23
+ ResponseEntity <Foo > getNestedSelfReference ();
24
+
25
+ }
Original file line number Diff line number Diff line change
1
+ /*
2
+ * This class is auto generated by https://github.com/hauner/openapi-generatr-spring.
3
+ * DO NOT EDIT.
4
+ */
5
+
6
+ package generated .model ;
7
+
8
+ import com .fasterxml .jackson .annotation .JsonProperty ;
9
+
10
+ public class Bar {
11
+
12
+ @ JsonProperty ("parent" )
13
+ private Foo parent ;
14
+
15
+ public Foo getParent () {
16
+ return parent ;
17
+ }
18
+
19
+ public void setParent (Foo parent ) {
20
+ this .parent = parent ;
21
+ }
22
+
23
+ }
Original file line number Diff line number Diff line change
1
+ /*
2
+ * This class is auto generated by https://github.com/hauner/openapi-generatr-spring.
3
+ * DO NOT EDIT.
4
+ */
5
+
6
+ package generated .model ;
7
+
8
+ import com .fasterxml .jackson .annotation .JsonProperty ;
9
+
10
+ public class Foo {
11
+
12
+ @ JsonProperty ("child" )
13
+ private Bar child ;
14
+
15
+ public Bar getChild () {
16
+ return child ;
17
+ }
18
+
19
+ public void setChild (Bar child ) {
20
+ this .child = child ;
21
+ }
22
+
23
+ }
Original file line number Diff line number Diff line change
1
+ /*
2
+ * This class is auto generated by https://github.com/hauner/openapi-generatr-spring.
3
+ * DO NOT EDIT.
4
+ */
5
+
6
+ package generated .model ;
7
+
8
+ import com .fasterxml .jackson .annotation .JsonProperty ;
9
+
10
+ public class Self {
11
+
12
+ @ JsonProperty ("self" )
13
+ private Self self ;
14
+
15
+ public Self getSelf () {
16
+ return self ;
17
+ }
18
+
19
+ public void setSelf (Self self ) {
20
+ this .self = self ;
21
+ }
22
+
23
+ }
Original file line number Diff line number Diff line change
1
+ openapi : 3.0.2
2
+ info :
3
+ title : test $ref loop
4
+ version : 1.0.0
5
+
6
+ paths :
7
+
8
+ /self-reference :
9
+ get :
10
+ responses :
11
+ ' 200 ' :
12
+ description : none
13
+ content :
14
+ application/json :
15
+ schema :
16
+ $ref : ' #/components/schemas/Self'
17
+
18
+ /nested-self-reference :
19
+ get :
20
+ responses :
21
+ ' 200 ' :
22
+ description : none
23
+ content :
24
+ application/json :
25
+ schema :
26
+ $ref : ' #/components/schemas/Foo'
27
+
28
+ components :
29
+ schemas :
30
+
31
+ Self :
32
+ type : object
33
+ properties :
34
+ self :
35
+ $ref : ' #/components/schemas/Self'
36
+
37
+ Foo :
38
+ type : object
39
+ properties :
40
+ child :
41
+ $ref : ' #/components/schemas/Bar'
42
+
43
+ Bar :
44
+ type : object
45
+ properties :
46
+ parent :
47
+ $ref : ' #/components/schemas/Foo'
You can’t perform that action at this time.
0 commit comments