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 1010DOCUMENTATION_FILE = f'{ KW_OPEN_API } { c .DOT } { KW_JSON } '
1111
1212def 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
1715def getDocumentationFilePath (apiInstance ):
18- # globals = apiInstance.globals
19- # return f'{getDocumentationFolderPath(apiInstance)}{globals.OS_SEPARATOR}{DOCUMENTATION_FILE}'
2016 return f'{ apiInstance .documentationFolderPath } { DOCUMENTATION_FILE } '
2117
2218def loadDocumentationAsString (apiInstance ):
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 11from distutils .core import setup
22
3- version = '0.0.1-43 '
3+ version = '0.0.1-44 '
44name = 'python_framework'
55url = f'https://github.com/SamuelJansen/{ name } /'
66
You can’t perform that action at this time.
0 commit comments