Skip to content

Commit 2e9caf4

Browse files
committed
configs; python improvements by @mpnordland, refs #20
1 parent 535b127 commit 2e9caf4

3 files changed

Lines changed: 72 additions & 35 deletions

File tree

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ script:
1717
- bin/checkRuby.sh
1818
- bin/checkBash.sh
1919
- bin/checkHaskell.sh
20+
- bin/checkPython.sh

bin/checkPython.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
python --version
6+
7+
cd out/python
8+
cd swagger_client
9+
python -m py_compile *.py
10+
cd ../..
11+

configs/python.json

Lines changed: 60 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,62 @@
11
{
2-
"defaults": {
3-
"asyncio": true,
4-
"tornado": true
5-
},
6-
"directories": [
7-
"asyncio", "tornado"
8-
],
9-
"partials": {
10-
"partial_header": "partial_header.mustache"
11-
},
12-
"transformations": [
13-
{ "input": "travis.mustache", "output": ".travis.yml" },
14-
{ "input": "asyncio/rest.mustache", "output": "asyncio/rest.py" },
15-
{ "input": "tornado/rest.mustache", "output": "tornado/rest.py" },
16-
{ "input": "rest.mustache", "output": "rest.py" },
17-
{ "input": "setup.mustache", "output": "setup.py" },
18-
{ "input": "configuration.mustache", "output": "configuration.py" },
19-
{ "input": "api.mustache", "output": "api.py" },
20-
{ "input": "api_client.mustache", "output": "api_client.py" },
21-
{ "input": "api_doc.mustache", "output": "api_doc.md" },
22-
{ "input": "api_test.mustache", "output": "api_test.py" },
23-
{ "input": "model.mustache", "output": "model.py" },
24-
{ "input": "model_doc.mustache", "output": "model_doc.md" },
25-
{ "input": "model_test.mustache", "output": "model_test.py" },
26-
{ "input": "README.mustache", "output": "README.md" },
27-
{ "input": "requirements.mustache", "output": "requirements.txt" },
28-
{ "input": "test-requirements.mustache", "output": "test-requirements.txt" },
29-
{ "input": "tox.mustache", "output": "tox.ini" },
30-
{ "input": "git_push.sh.mustache", "output": "git_push.sh" },
31-
{ "input": "gitignore.mustache", "output": ".gitignore" },
32-
{ "input": "__init__api.mustache", "output": "__init__api.py" },
33-
{ "input": "__init__test.mustache", "output": "__init__test.py" },
34-
{ "input": "__init__model.mustache", "output": "__init__model.py" },
35-
{ "input": "__init__package.mustache", "output": "__init_package.py" }
36-
]
2+
"name": "Python",
3+
"type": "client",
4+
"defaults": {
5+
"asyncio": false,
6+
"tornado": false,
7+
"packageName": "swagger_client",
8+
"package": "swagger_client",
9+
"baseNamespace": "swagger_client",
10+
"generatorPackage": "swagger_client",
11+
"invokerPackage": "swagger_client",
12+
"importPath": "swagger_client",
13+
"apiPackage": "swagger_client.api",
14+
"pythonPackageName":"swagger_client",
15+
"modelPackage": "swagger_client.model",
16+
"clientPackage": "swagger_client.api_client",
17+
"modelNaming": "PascalCase",
18+
"modelPropertyNaming": "snake_case",
19+
"imports": []
20+
},
21+
"directories": [
22+
"swagger_client",
23+
"swagger_client/models",
24+
"swagger_client/api",
25+
"test",
26+
"asyncio",
27+
"tornado",
28+
"docs"
29+
],
30+
"partials": {
31+
"partial_header": "partial_header.mustache"
32+
},
33+
"transformations": [
34+
{ "input": "travis.mustache", "output": ".travis.yml" },
35+
{ "input": "rest.mustache", "output": "swagger_client/rest.py" },
36+
{ "input": "setup.mustache", "output": "setup.py" },
37+
{ "input": "configuration.mustache", "output": "swagger_client/configuration.py" },
38+
{ "input": "api_client.mustache", "output": "swagger_client/api_client.py" },
39+
{ "input": "api_test.mustache", "output": "api_test.py" },
40+
{ "input": "README.mustache", "output": "README.md" },
41+
{ "input": "requirements.mustache", "output": "requirements.txt" },
42+
{ "input": "test-requirements.mustache", "output": "test-requirements.txt" },
43+
{ "input": "tox.mustache", "output": "tox.ini" },
44+
{ "input": "git_push.sh.mustache", "output": "git_push.sh" },
45+
{ "input": "gitignore.mustache", "output": ".gitignore" },
46+
{ "input": "tornado/rest.mustache", "output": "tornado/rest.py" },
47+
{ "input": "asyncio/rest.mustache", "output": "asyncio/rest.py" },
48+
{ "input": "__init__api.mustache", "output": "swagger_client/api/__init__.py" },
49+
{ "input": "__init__test.mustache", "output": "test/__init__.py" },
50+
{ "input": "__init__model.mustache", "output": "swagger_client/models/__init__.py" },
51+
{ "input": "__init__package.mustache", "output": "swagger_client/__init__.py" }
52+
],
53+
"perApi":[
54+
{ "input": "api_doc.mustache", "output": "docs/{{name}}Api.md" },
55+
{ "input": "api.mustache", "output": "swagger_client/api/{{name}}_api.py" }
56+
],
57+
"perModel": [
58+
{ "input": "model.mustache", "output": "swagger_client/models/{{#models}}{{#model}}{{name}}{{/model}}{{/models}}.py" },
59+
{ "input": "model_test.mustache", "output": "test/test_{{#models}}{{#model}}{{name}}{{/model}}{{/models}}.py" },
60+
{ "input": "model_doc.mustache", "output": "docs/{{#models}}{{#model}}{{name}}{{/model}}{{/models}}.md" }
61+
]
3762
}

0 commit comments

Comments
 (0)