Flask-AppBuilder
Flask-AppBuilder copied to clipboard
Invalid URLs for OpenApi + SwaggerView with relativ url root
Flask-Appbuilder version: 3.0.1
When using openapi and swagger view with a relativ url root (e.g. localhost/foo/bar/api/v1) urls are not correct. A possible fix could be the following:
in api/manager.py
servers=[{"url": url_for("OpenApi.get", version=version)[:-9]}],
openapi_uri=url_for(OpenApi.__name__ + "." + OpenApi.get.__name__, version=version),
Good point, can you make a PR?
Not fixed yet ((. For personal purposes i made a workaroud at one time... Might be useful to someone. https://github.com/lexisstv/fab_addon_SwaggerTemporaryFix