Skip to content

Commit 935f2b3

Browse files
committed
new release
1 parent bede868 commit 935f2b3

3 files changed

Lines changed: 2 additions & 16 deletions

File tree

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,9 @@
1010
DOCUMENTATION_FILE = f'{KW_OPEN_API}{c.DOT}{KW_JSON}'
1111

1212
def getDocumentationFolderPath(apiInstance):
13-
# globals = apiInstance.globals
14-
# return f'{globals.currentPath}{KW_API}{globals.OS_SEPARATOR}{KW_RESOURCE}{globals.OS_SEPARATOR}{KW_OPEN_API}{KW_UI}'
1513
return apiInstance.documentationFolderPath
1614

1715
def getDocumentationFilePath(apiInstance):
18-
# globals = apiInstance.globals
19-
# return f'{getDocumentationFolderPath(apiInstance)}{globals.OS_SEPARATOR}{DOCUMENTATION_FILE}'
2016
return f'{apiInstance.documentationFolderPath}{DOCUMENTATION_FILE}'
2117

2218
def loadDocumentationAsString(apiInstance):

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

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,9 @@ def addSwagger(apiInstance, appInstance):
6262
documentationUrl,
6363
DOCUMENTATION_FILE
6464
)
65-
log.debug(addSwagger, f'''Swagger original static folder at "{swaggerUi._static_folder}"''')
66-
###- a = 'src\service\openapi\OpenApiManager.py'
6765
selfSrcPath = f"""src{globals.OS_SEPARATOR}service{globals.OS_SEPARATOR}openapi{globals.OS_SEPARATOR}{__name__.split('.')[-1]}.py"""
68-
log.debug(addSwagger, f'''selfSrcPath folder at "{selfSrcPath}"''')
69-
7066
apiInstance.documentationFolderPath = f'''{__file__.split(selfSrcPath)[0]}{KW_RESOURCE}{globals.OS_SEPARATOR}{KW_OPEN_API}{KW_UI}{globals.OS_SEPARATOR}'''
71-
log.debug(addSwagger, f'''apiInstance.documentationFolderPath folder at "{apiInstance.documentationFolderPath}"''')
72-
73-
swaggerUi._static_folder = apiInstance.documentationFolderPath ###- f'{globals.currentPath}api{globals.OS_SEPARATOR}resource{globals.OS_SEPARATOR}swaggerui{globals.OS_SEPARATOR}'
74-
log.debug(addSwagger, f'''Swagger static folder at "{swaggerUi._static_folder}"''')
75-
log.debug(addSwagger, f'''Swagger lib name "{__name__}"''')
76-
log.debug(addSwagger, f'''Swagger lib folder "{__file__}"''')
77-
# swaggerUi._static_folder = f'{OpenApiDocumentationFile.getDocumentationFolderPath(apiInstance)}{globals.OS_SEPARATOR}'
67+
swaggerUi._static_folder = apiInstance.documentationFolderPath
7868
appInstance.register_blueprint(swaggerUi, url_prefix=documentationUrl)
7969
OpenApiDocumentationFile.overrideDocumentation(apiInstance)
8070

‎setup.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from distutils.core import setup
22

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

0 commit comments

Comments
 (0)