mirror of
https://github.com/ilri/dspace-statistics-api.git
synced 2024-11-21 22:05:02 +01:00
Alan Orth
be83514de1
All checks were successful
continuous-integration/drone/push Build is passing
It turns out that Swagger UI mostly does the "right" thing for our use cases here, but it assumes that API paths are relative to the root of the host where it is being served. This works in the local development environment because we are serving on "/", but it does not work in production where the API is deployed beneath the DSpace REST API, for example at "/rest/statistics". The solution here is to allow configuration of the DSpace Statistics API path and use that when registering the Swagger UI as well as in a new "server" block in the OpenAPI JSON schema. By default it is configured to work out of the box in a development environment. Set the DSPACE_STATISTICS_API_URL environment variable to something like "/rest/statistics" when running in production. |
||
---|---|---|
.. | ||
docs | ||
__init__.py | ||
app.py | ||
config.py | ||
database.py | ||
indexer.py | ||
stats.py | ||
util.py |