File tree Expand file tree Collapse file tree
openapi-processor-core/src/testInt/resources/tests/schema-duplicate-by-refs Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ items :
2+ - generated/api/Api.java
3+ - generated/model/FooOne.java
4+ - generated/model/FooTwo.java
Original file line number Diff line number Diff line change 1+ /*
2+ * This class is auto generated by https://github.com/hauner/openapi-processor-core.
3+ * TEST ONLY.
4+ */
5+
6+ package generated .api ;
7+
8+ import annotation .Mapping ;
9+ import generated .model .FooOne ;
10+ import generated .model .FooTwo ;
11+
12+ public interface Api {
13+
14+ @ Mapping ("/foo-one" )
15+ FooOne getFoo ();
16+
17+ @ Mapping ("/foo-two" )
18+ FooTwo getFoo ();
19+
20+ }
Original file line number Diff line number Diff line change 1+ /*
2+ * This class is auto generated by https://github.com/hauner/openapi-processor-core.
3+ * TEST ONLY.
4+ */
5+
6+ package generated .model ;
7+
8+ import com .fasterxml .jackson .annotation .JsonProperty ;
9+
10+ public class FooOne {
11+
12+ @ JsonProperty ("foo-one" )
13+ private String fooOne ;
14+
15+ public String getFooOne () {
16+ return fooOne ;
17+ }
18+
19+ public void setFooOne (String fooOne ) {
20+ this .fooOne = fooOne ;
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-processor-core.
3+ * TEST ONLY.
4+ */
5+
6+ package generated .model ;
7+
8+ import com .fasterxml .jackson .annotation .JsonProperty ;
9+
10+ public class FooTwo {
11+
12+ @ JsonProperty ("foo-two" )
13+ private String fooTwo ;
14+
15+ public String getFooTwo () {
16+ return fooTwo ;
17+ }
18+
19+ public void setFooTwo (String fooTwo ) {
20+ this .fooTwo = fooTwo ;
21+ }
22+
23+ }
Original file line number Diff line number Diff line change 1+ items :
2+ - inputs/openapi.yaml
3+ - inputs/one.yaml
4+ - inputs/two.yaml
5+ - inputs/mapping.yaml
Original file line number Diff line number Diff line change 1+ openapi-processor-mapping : v2
2+
3+ options :
4+ package-name : generated
5+
6+ # map:
Original file line number Diff line number Diff line change 1+ Foo :
2+ type : object
3+ properties :
4+ foo_one :
5+ type : string
Original file line number Diff line number Diff line change 1+ openapi : 3.0.2
2+ info :
3+ title : test duplicate schema
4+ version : 1.0.0
5+
6+ paths :
7+
8+ /foo-one :
9+ get :
10+ responses :
11+ ' 200 ' :
12+ description : result
13+ content :
14+ application/json :
15+ schema :
16+ $ref : ' one.yaml#/Foo'
17+
18+ /foo-two :
19+ get :
20+ responses :
21+ ' 200 ' :
22+ description : result
23+ content :
24+ application/json :
25+ schema :
26+ $ref : ' two.yaml#/Foo'
Original file line number Diff line number Diff line change 1+ Foo :
2+ type : object
3+ properties :
4+ foo_two :
5+ type : string
Original file line number Diff line number Diff line change 1+ == not currently supported
2+
3+ == swagger
4+
5+ duplicate handling produces two schemas
6+
7+ ----
8+ Foo
9+ Foo_1
10+ ----
11+
12+ there is no way to change it.
13+
14+ == openapi4j
15+
16+ no duplicate handling, produces two `Foo` s
You can’t perform that action at this time.
0 commit comments