File tree 1 file changed +36
-0
lines changed
1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,42 @@ def test_api_base_path_slash():
51
51
assert api .blueprint .url_prefix == ""
52
52
53
53
54
+ def test_remote_api ():
55
+ api = FlaskApi (
56
+ Specification .load (
57
+ "https://raw.githubusercontent.com/spec-first/connexion/165a915/tests/fixtures/simple/swagger.yaml"
58
+ ),
59
+ base_path = "/api/v1.0" ,
60
+ )
61
+ assert api .blueprint .name == "/api/v1_0"
62
+ assert api .blueprint .url_prefix == "/api/v1.0"
63
+
64
+ api2 = FlaskApi (
65
+ Specification .load (
66
+ "https://raw.githubusercontent.com/spec-first/connexion/165a915/tests/fixtures/simple/swagger.yaml"
67
+ )
68
+ )
69
+ assert api2 .blueprint .name == "/v1_0"
70
+ assert api2 .blueprint .url_prefix == "/v1.0"
71
+
72
+ api3 = FlaskApi (
73
+ Specification .load (
74
+ "https://raw.githubusercontent.com/spec-first/connexion/165a915/tests/fixtures/simple/openapi.yaml"
75
+ ),
76
+ base_path = "/api/v1.0" ,
77
+ )
78
+ assert api3 .blueprint .name == "/api/v1_0"
79
+ assert api3 .blueprint .url_prefix == "/api/v1.0"
80
+
81
+ api4 = FlaskApi (
82
+ Specification .load (
83
+ "https://raw.githubusercontent.com/spec-first/connexion/165a915/tests/fixtures/simple/openapi.yaml"
84
+ )
85
+ )
86
+ assert api4 .blueprint .name == "/v1_0"
87
+ assert api4 .blueprint .url_prefix == "/v1.0"
88
+
89
+
54
90
def test_template ():
55
91
api1 = FlaskApi (
56
92
Specification .load (
You can’t perform that action at this time.
0 commit comments