This repository was archived by the owner on Mar 16, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
src/testInt/resources/tests/response-content-multiple-style-success Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11items :
22 - generated/api/Api.java
3+ - generated/api/MixedApi.java
4+ - generated/api/NoneApi.java
35 - generated/model/Error.java
46 - generated/model/Foo.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 .Foo ;
10+
11+ public interface MixedApi {
12+
13+ @ Mapping ("/foo-mixed" )
14+ Foo getFooMixedApplicationJson ();
15+
16+ @ Mapping ("/foo-mixed" )
17+ String getFooMixedTextPlain ();
18+
19+ }
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+
10+ public interface NoneApi {
11+
12+ @ Mapping ("/foo-none" )
13+ void getFooNone ();
14+
15+ }
Original file line number Diff line number Diff line change @@ -5,3 +5,10 @@ options:
55
66map :
77# result-style: success # default
8+
9+ paths : {}
10+
11+ # to set a no content type response status enable a wrapper (e.g. Spring ResponseEntity)
12+ # paths:
13+ # /foo:
14+ # result: io.openapiprocessor.ResultWrapper
Original file line number Diff line number Diff line change 55
66paths :
77 /foo :
8+ description : multiple success with content type
89 get :
910 responses :
1011 ' 200 ' :
@@ -23,6 +24,49 @@ paths:
2324 schema :
2425 $ref : ' #/components/schemas/Error'
2526
27+ /foo-mixed :
28+ description : multiple success with & without content type
29+ get :
30+ tags :
31+ - mixed
32+ responses :
33+ ' 200 ' :
34+ description : json or plain text result
35+ content :
36+ application/json :
37+ schema :
38+ $ref : ' #/components/schemas/Foo'
39+ text/plain :
40+ schema :
41+ type : string
42+ ' 202 ' :
43+ description : other success, no content type
44+ ' 204 ' :
45+ description : other success, no content type
46+ default :
47+ description : error
48+ content :
49+ application/xml :
50+ schema :
51+ $ref : ' #/components/schemas/Error'
52+
53+ /foo-none :
54+ get :
55+ description : responses without content type only
56+ tags :
57+ - none
58+ responses :
59+ ' 202 ' :
60+ description : other success, no content type
61+ ' 204 ' :
62+ description : other success, no content type
63+ default :
64+ description : error
65+ content :
66+ application/xml :
67+ schema :
68+ $ref : ' #/components/schemas/Error'
69+
2670components :
2771
2872 schemas :
You can’t perform that action at this time.
0 commit comments