fix: prefix on the url path
This commit is contained in:
parent
4804495371
commit
71a3091df0
|
@ -22,11 +22,13 @@ def createApp() -> Flask:
|
||||||
container.wire(modules=["blueprints.auth"])
|
container.wire(modules=["blueprints.auth"])
|
||||||
container.wire(modules=["blueprints.user"])
|
container.wire(modules=["blueprints.user"])
|
||||||
|
|
||||||
|
prefix = f"/api/{Config.API_VERSION}"
|
||||||
|
|
||||||
# Register Blueprints
|
# Register Blueprints
|
||||||
app.register_blueprint(default_blueprint)
|
app.register_blueprint(default_blueprint)
|
||||||
app.register_blueprint(swagger_blueprint)
|
app.register_blueprint(swagger_blueprint)
|
||||||
app.register_blueprint(auth_blueprint, url_prefix="/api")
|
app.register_blueprint(auth_blueprint, url_prefix=prefix)
|
||||||
app.register_blueprint(user_blueprint, url_prefix="/api")
|
app.register_blueprint(user_blueprint, url_prefix=prefix)
|
||||||
|
|
||||||
return app
|
return app
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,10 @@ info:
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
|
|
||||||
servers:
|
servers:
|
||||||
- url: http://api.example.com/v1
|
- url: http://127.0.0.1:5000/api/v1
|
||||||
description: Optional server description, e.g. Main (production) server
|
|
||||||
- url: http://127.0.0.1:5000/api
|
|
||||||
description: local server
|
description: local server
|
||||||
|
- url: http://api.example.com/api/v1
|
||||||
|
description: prduction server
|
||||||
|
|
||||||
tags:
|
tags:
|
||||||
- name: Auth
|
- name: Auth
|
||||||
|
|
Loading…
Reference in New Issue