Skip to content

Commit e1f31d4

Browse files
authored
Merge pull request #1026 from swagger-api/codegen-issue-10523
run swagger-ui on flask generated project
2 parents 63252dd + 382ecc1 commit e1f31d4

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

src/main/resources/handlebars/pythonFlaskConnexion/controller_test.mustache

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ class {{#operations}}Test{{classname}}(BaseTestCase):
1414
"""{{classname}} integration test stubs"""
1515

1616
{{#operation}}
17+
{{#contents}}
18+
{{#@first}}
1719
def test_{{operationId}}(self):
1820
"""Test case for {{{operationId}}}
1921

@@ -43,6 +45,8 @@ class {{#operations}}Test{{classname}}(BaseTestCase):
4345
self.assert200(response,
4446
'Response body is : ' + response.data.decode('utf-8'))
4547

48+
{{/@first}}
49+
{{/contents}}
4650
{{/operation}}
4751
{{/operations}}
4852

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
connexion == 2.6.0
1+
connexion >= 2.6.0
2+
connexion[swagger-ui] >= 2.6.0
23
python_dateutil == 2.6.0
34
{{#supportPython2}}
45
typing == 3.5.2.2
56
{{/supportPython2}}
67
setuptools >= 21.0.0
8+
swagger-ui-bundle >= 0.0.2

src/main/resources/handlebars/pythonFlaskConnexion/setup.mustache

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ VERSION = "{{packageVersion}}"
1313
# prerequisite: setuptools
1414
# http://pypi.python.org/pypi/setuptools
1515

16-
REQUIRES = ["connexion"]
16+
REQUIRES = [
17+
"connexion",
18+
"swagger-ui-bundle>=0.0.2"
19+
]
1720

1821
setup(
1922
name=NAME,

src/main/resources/handlebars/pythonFlaskConnexion/tox.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = {{#supportPython2}}py27, {{/supportPython2}}py35
2+
envlist = {{#supportPython2}}py27, {{/supportPython2}}py38
33

44
[testenv]
55
deps=-r{toxinidir}/requirements.txt

0 commit comments

Comments
 (0)