File tree Expand file tree Collapse file tree
openapi-processor-core/src
main/kotlin/io/openapiprocessor/core/model
testInt/resources/tests/response-success Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -192,7 +192,11 @@ class Endpoint(
192192 .toSet()
193193 }
194194
195- private fun isSuccessCode (code : String ) = code.startsWith(" 2" )
195+ private fun isSuccessCode (code : String ): Boolean {
196+ return code.startsWith(" 1" )
197+ || code.startsWith(" 2" )
198+ || code.startsWith(" 3" )
199+ }
196200
197201 private fun hasContentType (response : Response ) = response.contentType != " ?"
198202}
Original file line number Diff line number Diff line change 1+ prefix : api
2+ items :
3+ - inputs/openapi30.yaml
4+ - inputs/openapi31.yaml
5+ - inputs/openapi32.yaml
6+ - inputs/mapping.yaml
Original file line number Diff line number Diff line change 1+ openapi-processor-mapping : v16
2+
3+ options :
4+ package-name : generated
5+ format-code : false
Original file line number Diff line number Diff line change 1+ openapi : 3.0.2
2+ info :
3+ title : response success
4+ version : 1.0.0
5+
6+ paths :
7+
8+ /informational-is-success :
9+ get :
10+ responses :
11+ ' 102 ' :
12+ headers :
13+ Location :
14+ schema :
15+ type : string
16+
17+ /redirection-is-success :
18+ get :
19+ responses :
20+ ' 302 ' :
21+ headers :
22+ Location :
23+ schema :
24+ type : string
Original file line number Diff line number Diff line change 1+ openapi : 3.1.0
2+ info :
3+ title : response success
4+ version : 1.0.0
5+
6+ paths :
7+
8+ /informational-is-success :
9+ get :
10+ responses :
11+ ' 102 ' :
12+ headers :
13+ Location :
14+ schema :
15+ type : string
16+
17+ /redirection-is-success :
18+ get :
19+ responses :
20+ ' 302 ' :
21+ headers :
22+ Location :
23+ schema :
24+ type : string
Original file line number Diff line number Diff line change 1+ openapi : 3.2.0
2+ info :
3+ title : response success
4+ version : 1.0.0
5+
6+ paths :
7+
8+ /informational-is-success :
9+ get :
10+ responses :
11+ ' 102 ' :
12+ headers :
13+ Location :
14+ schema :
15+ type : string
16+
17+ /redirection-is-success :
18+ get :
19+ responses :
20+ ' 302 ' :
21+ headers :
22+ Location :
23+ schema :
24+ type : string
Original file line number Diff line number Diff line change 1+ prefix : generated
2+ items :
3+ - 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 .Status ;
5+ import generated .support .Generated ;
6+
7+ @ Generated (value = "openapi-processor-core" , version = "test" )
8+ public interface Api {
9+
10+ @ Status ("102" )
11+ @ Mapping ("/informational-is-success" )
12+ void getInformationalIsSuccess ();
13+
14+ @ Status ("302" )
15+ @ Mapping ("/redirection-is-success" )
16+ void getRedirectionIsSuccess ();
17+
18+ }
You can’t perform that action at this time.
0 commit comments