Show url_prefix in spec

This commit is contained in:
Sandro Jäckel 2025-07-28 01:08:51 +02:00
parent 5486497da7
commit 9e01786704
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -1276,6 +1276,7 @@ def create_app(args):
limiter.init_app(app) limiter.init_app(app)
swag = swagger(app) swag = swagger(app)
swag["basePath"] = args.url_prefix if args.url_prefix != "" else "/"
swag["info"]["version"] = get_version() swag["info"]["version"] = get_version()
swag["info"]["title"] = "LibreTranslate" swag["info"]["title"] = "LibreTranslate"
swag["info"]["description"] = "Free and Open Source Machine Translation API." swag["info"]["description"] = "Free and Open Source Machine Translation API."