Skip to content

Commit

Permalink
2019.12.5 v1.1.16, modify swagger demo for 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
itaa committed Dec 5, 2019
1 parent 5e13767 commit 5a3c309
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions demo/swagger/demo_flask_blueprint_swagger.py
Expand Up @@ -61,10 +61,10 @@ def test_update():


# 定义路由信息, 并指定路由映射的方法,请求方式等
APPBlueprint.add_url_rule(f'/v1/query', view_func=test_query, methods=['GET'], endpoint='test_func1')
APPBlueprint.add_url_rule(f'/v1/add', view_func=test_add, methods=['POST'], endpoint='test_func2')
APPBlueprint.add_url_rule(f'/v1/del', view_func=test_del, methods=['DELETE'], endpoint='test_func3')
APPBlueprint.add_url_rule(f'/v1/update', view_func=test_update, methods=['PUT'], endpoint='test_func4')
APPBlueprint.add_url_rule('/v1/query', view_func=test_query, methods=['GET'], endpoint='test_func1')
APPBlueprint.add_url_rule('/v1/add', view_func=test_add, methods=['POST'], endpoint='test_func2')
APPBlueprint.add_url_rule('/v1/del', view_func=test_del, methods=['DELETE'], endpoint='test_func3')
APPBlueprint.add_url_rule('/v1/update', view_func=test_update, methods=['PUT'], endpoint='test_func4')

app.register_blueprint(APPBlueprint)
# 将 app 对象传递给 swagger 模块
Expand Down

0 comments on commit 5a3c309

Please sign in to comment.