mirror of
https://github.com/ilri/dspace-statistics-api.git
synced 2025-05-08 22:26:04 +02:00
openapi.json: Set the API version from config
We don't need to hard code this in the JSON anymore since we are reading and modifying it now for the server config anyways.
This commit is contained in:
@ -58,6 +58,9 @@ class OpenAPIJSONResource:
|
||||
if DSPACE_STATISTICS_API_URL != "":
|
||||
data["servers"] = [{"url": DSPACE_STATISTICS_API_URL}]
|
||||
|
||||
# Set the version in the schema so Swagger UI can display it
|
||||
data["info"]["version"] = VERSION
|
||||
|
||||
resp.body = json.dumps(data)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user