Skip to content

Commit cfddf44

Browse files
authored
Update the swagger docs version to dynamic (#805)
1 parent 085b32e commit cfddf44

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

backend/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# -*- coding: utf-8 -*-
33
from backend.common.i18n import i18n
44

5-
__version__ = '1.8.0'
5+
__version__ = '1.8.1'
66

77

88
# 初始化 i18n

backend/core/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ class Settings(BaseSettings):
2525
# FastAPI
2626
FASTAPI_API_V1_PATH: str = '/api/v1'
2727
FASTAPI_TITLE: str = 'FastAPI'
28-
FASTAPI_VERSION: str = '1.5.0'
2928
FASTAPI_DESCRIPTION: str = 'FastAPI Best Architecture'
3029
FASTAPI_DOCS_URL: str = '/docs'
3130
FASTAPI_REDOC_URL: str = '/redoc'

backend/core/registrar.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from starlette.staticfiles import StaticFiles
1818
from starlette.types import ASGIApp
1919

20+
from backend import __version__
2021
from backend.common.exception.exception_handler import register_exception
2122
from backend.common.log import set_custom_logfile, setup_logging
2223
from backend.core.conf import settings
@@ -85,7 +86,7 @@ def build_middleware_stack(self) -> ASGIApp:
8586

8687
app = MyFastAPI(
8788
title=settings.FASTAPI_TITLE,
88-
version=settings.FASTAPI_VERSION,
89+
version=__version__,
8990
description=settings.FASTAPI_DESCRIPTION,
9091
docs_url=settings.FASTAPI_DOCS_URL,
9192
redoc_url=settings.FASTAPI_REDOC_URL,

0 commit comments

Comments
 (0)