diff --git a/dspace_statistics_api/app.py b/dspace_statistics_api/app.py index 6bf0bfe..736eed1 100644 --- a/dspace_statistics_api/app.py +++ b/dspace_statistics_api/app.py @@ -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) diff --git a/dspace_statistics_api/docs/openapi.json b/dspace_statistics_api/docs/openapi.json index 45daedd..86eaa78 100644 --- a/dspace_statistics_api/docs/openapi.json +++ b/dspace_statistics_api/docs/openapi.json @@ -1,7 +1,6 @@ { "openapi": "3.0.3", "info": { - "version": "1.4.0-dev", "title": "DSpace Statistics API", "description": "A [Falcon-based](https://falcon.readthedocs.io/) web application to make DSpace's item, community, and collection statistics available via a simple REST API. This Swagger interface is powered by [falcon-swagger-ui](https://github.com/rdidyk/falcon-swagger-ui).", "license": {