File tree Expand file tree Collapse file tree
python_framework/api/src/service/openapi Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5757
5858def addSwagger (apiInstance , appInstance ):
5959 globals = apiInstance .globals
60- documentationUrl = f'{ c . SLASH } { apiInstance .baseUrl } { c .SLASH } { KW_OPEN_API } '
60+ documentationUrl = f'{ apiInstance .baseUrl } { c .SLASH } { KW_OPEN_API } '
6161 swaggerUi = get_swaggerui_blueprint (
6262 documentationUrl ,
6363 DOCUMENTATION_FILE
6464 )
6565 selfSrcPath = f"""src{ globals .OS_SEPARATOR } service{ globals .OS_SEPARATOR } openapi{ globals .OS_SEPARATOR } { __name__ .split ('.' )[- 1 ]} .py"""
6666 log .debug (addSwagger , f'selfSrcPath at "{ selfSrcPath } "' )
6767
68- apiInstance .documentationFolderPath = f'''{ __file__ .split (selfSrcPath )[0 ]} { KW_RESOURCE } { globals .OS_SEPARATOR } { KW_OPEN_API } { KW_UI } '''
69- log .debug (addSwagger , f'apiInstance.documentationFolderPath at "{ apiInstance .documentationFolderPath } "' )
70-
71- # apiInstance.documentationFolderPath = f'''{__file__.split(selfSrcPath)[0]}{KW_RESOURCE}{globals.OS_SEPARATOR}{KW_OPEN_API}{KW_UI}{globals.OS_SEPARATOR}'''
68+ # apiInstance.documentationFolderPath = f'''{__file__.split(selfSrcPath)[0]}{KW_RESOURCE}{globals.OS_SEPARATOR}{KW_OPEN_API}{KW_UI}'''
7269 # log.debug(addSwagger, f'apiInstance.documentationFolderPath at "{apiInstance.documentationFolderPath}"')
7370
71+ apiInstance .documentationFolderPath = f'''{ __file__ .split (selfSrcPath )[0 ]} { KW_RESOURCE } { globals .OS_SEPARATOR } { KW_OPEN_API } { KW_UI } { globals .OS_SEPARATOR } '''
72+ log .debug (addSwagger , f'apiInstance.documentationFolderPath at "{ apiInstance .documentationFolderPath } "' )
73+
7474 swaggerUi ._static_folder = apiInstance .documentationFolderPath
7575 log .debug (addSwagger , f'swaggerUi._static_folder at "{ swaggerUi ._static_folder } "' )
7676
You can’t perform that action at this time.
0 commit comments