Skip to content

Commit 6ed8e62

Browse files
committed
update readme
1 parent 6259f67 commit 6ed8e62

File tree

2 files changed

+28
-6
lines changed

2 files changed

+28
-6
lines changed

README.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Flask/Tornado RESTful Application Code Generator
1+
# Flask/Tornado/Falcon RESTful Application Code Generator
22

33
[![Build Status][travis-image]][travis-url] [![PyPi Version][pypi-image]][pypi-url]
44

55
## Overview
66

7-
Generate Flask/Tornado-RESTful application code from a Swagger Specification doc.
7+
Generate Flask/Tornado-RESTful/Falcon application code from a Swagger Specification doc.
88

99
**Alpha version for now, it can not handle all validation properly.**
1010

@@ -32,7 +32,7 @@ Command Options:
3232
--spec, --specification Generate online specification json response.
3333
--ui Generate swagger ui.
3434
-j, --jobs INTEGER Parallel jobs for processing.
35-
-tlp, --templates gen flask/tornado templates,default flask.
35+
-tlp, --templates gen flask/tornado/falcon templates, default flask.
3636
--version Show current version.
3737
--help Show this message and exit.
3838

@@ -65,7 +65,7 @@ Generate example-app from [apis.yml](https://github.com/guokr/swagger-py-codegen
6565
| |__ validators.py
6666
|__ requirements.txt
6767

68-
$ swagger_py_codegen -s docs/panel.yml example-app -p demo -tlp=tornado
68+
$ swagger_py_codegen -s api.yml example-app -p demo -tlp=tornado
6969
$ tree (tornado-demo)
7070
.
7171
|__ api.yml
@@ -88,6 +88,28 @@ Generate example-app from [apis.yml](https://github.com/guokr/swagger-py-codegen
8888
| |__ validators.py
8989
|__ requirements.txt
9090

91+
$ swagger_py_codegen -s api.yml example-app -p demo
92+
$ tree (falcon-demo)
93+
.
94+
|__ api.yml
95+
|__ example-app
96+
|__ demo
97+
| |__ __init__.py
98+
| |__ v1
99+
| |__ api
100+
| | |__ __init__.py
101+
| | |__ oauth_auth_approach_approach.py
102+
| | |__ oauth_auth_approach.py
103+
| | |__ users_token.py
104+
| | |__ users_current.py
105+
| | |__ users.py
106+
| |__ __init__.py
107+
| |__ routes.py
108+
| |__ schemas.py
109+
| |__ validators.py
110+
|__ requirements.txt
111+
112+
91113
Install example-app requirements:
92114

93115
$ cd example-app

swagger_py_codegen/templates/falcon/app.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,5 @@ def register_routes(app):
5050

5151
if __name__ == '__main__':
5252
app = create_app()
53-
httpd = simple_server.make_server('127.0.0.1', 8888, app)
54-
httpd.serve_forever()
53+
httpd = simple_server.make_server('127.0.0.1', 5000, app)
54+
httpd.serve_forever()

0 commit comments

Comments
 (0)