Skip to content

Commit 4070f97

Browse files
committed
feat: globals updated
1 parent 3c4c245 commit 4070f97

2 files changed

Lines changed: 11 additions & 13 deletions

File tree

‎python_framework/api/src/service/openapi/OpenApiManager.py‎

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,18 @@ def addSwagger(apiInstance, appInstance):
6262
documentationUrl,
6363
DOCUMENTATION_FILE
6464
)
65-
selfSrcPath = f"""src{globals.OS_SEPARATOR}service{globals.OS_SEPARATOR}openapi{globals.OS_SEPARATOR}{__name__.split('.')[-1]}.py"""
66-
log.debug(addSwagger, f'selfSrcPath at "{selfSrcPath}"')
67-
68-
# apiInstance.documentationFolderPath = f'''{__file__.split(selfSrcPath)[0]}{KW_RESOURCE}{globals.OS_SEPARATOR}{KW_OPEN_API}{KW_UI}'''
65+
# selfSrcPath = f"""src{globals.OS_SEPARATOR}service{globals.OS_SEPARATOR}openapi{globals.OS_SEPARATOR}{__name__.split('.')[-1]}.py"""
66+
# log.debug(addSwagger, f'selfSrcPath at "{selfSrcPath}"')
67+
#
68+
# apiInstance.documentationFolderPath = f'''{__file__.split(selfSrcPath)[0]}{KW_RESOURCE}{globals.OS_SEPARATOR}{KW_OPEN_API}{KW_UI}{globals.OS_SEPARATOR}'''
6969
# log.debug(addSwagger, f'apiInstance.documentationFolderPath at "{apiInstance.documentationFolderPath}"')
70+
#
71+
# swaggerUi._static_folder = apiInstance.documentationFolderPath
72+
# log.debug(addSwagger, f'swaggerUi._static_folder at "{swaggerUi._static_folder}"')
7073

71-
apiInstance.documentationFolderPath = f'''{__file__.split(selfSrcPath)[0]}{KW_RESOURCE}{globals.OS_SEPARATOR}{KW_OPEN_API}{KW_UI}{globals.OS_SEPARATOR}'''
74+
apiInstance.documentationFolderPath = swaggerUi._static_folder
7275
log.debug(addSwagger, f'apiInstance.documentationFolderPath at "{apiInstance.documentationFolderPath}"')
7376

74-
swaggerUi._static_folder = apiInstance.documentationFolderPath
75-
log.debug(addSwagger, f'swaggerUi._static_folder at "{swaggerUi._static_folder}"')
76-
77-
# apiInstance.documentationFolderPath = swaggerUi._static_folder
78-
# log.debug(addSwagger, f'apiInstance.documentationFolderPath at "{apiInstance.documentationFolderPath}"')
79-
8077
appInstance.register_blueprint(swaggerUi, url_prefix=documentationUrl)
8178
OpenApiDocumentationFile.overrideDocumentation(apiInstance)
8279

‎setup.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
from distutils.core import setup
22

3-
version = '0.0.1-66'
3+
version = '0.0.1-67'
44
name = 'python_framework'
55
url = f'https://github.com/SamuelJansen/{name}/'
66

7-
dataFilePackage = "Python38/site-packages"
7+
# dataFilePackage = "Python38/site-packages"
8+
dataFilePackage = "dist"
89

910
swaggerRelativePath = "/api/resource/swaggerui"
1011

0 commit comments

Comments
 (0)