1
0
mirror of https://github.com/ilri/dspace-statistics-api.git synced 2024-12-18 02:32:20 +01: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:
Alan Orth 2020-12-27 12:48:13 +02:00
parent 2567bb8604
commit 05e0e8bdca
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
2 changed files with 3 additions and 1 deletions

View File

@ -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)

View File

@ -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": {