@@ -62,18 +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}{globals.OS_SEPARATOR}'''
69- # 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}"')
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 } "' )
7367
74- apiInstance .documentationFolderPath = swaggerUi . _static_folder
68+ apiInstance .documentationFolderPath = f''' { __file__ . split ( selfSrcPath )[ 0 ] } { KW_RESOURCE } { globals . OS_SEPARATOR } { KW_OPEN_API } { KW_UI } { globals . OS_SEPARATOR } '''
7569 log .debug (addSwagger , f'apiInstance.documentationFolderPath at "{ apiInstance .documentationFolderPath } "' )
7670
71+ swaggerUi ._static_folder = apiInstance .documentationFolderPath
72+ log .debug (addSwagger , f'swaggerUi._static_folder at "{ swaggerUi ._static_folder } "' )
73+
74+ # apiInstance.documentationFolderPath = swaggerUi._static_folder
75+ # log.debug(addSwagger, f'apiInstance.documentationFolderPath at "{apiInstance.documentationFolderPath}"')
76+
7777 appInstance .register_blueprint (swaggerUi , url_prefix = documentationUrl )
7878 OpenApiDocumentationFile .overrideDocumentation (apiInstance )
7979
0 commit comments