1
0
mirror of https://github.com/ilri/dspace-statistics-api.git synced 2024-06-26 08:03:47 +02:00
dspace-statistics-api/dspace_statistics_api
Alan Orth be83514de1
All checks were successful
continuous-integration/drone/push Build is passing
Re-work Swagger UI configuration
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.
2020-12-23 13:25:17 +02:00
..
docs dspace_statistics_api/docs/openapi.json: Add /status 2020-12-22 11:41:47 +02:00
__init__.py Refactor project structure 2018-10-28 11:14:21 +02:00
app.py Re-work Swagger UI configuration 2020-12-23 13:25:17 +02:00
config.py Re-work Swagger UI configuration 2020-12-23 13:25:17 +02:00
database.py dspace_statistics_api: Use f-strings instead of format() 2020-03-02 11:24:29 +02:00
indexer.py indexer.py: Add support for communities and collections 2020-12-18 22:53:16 +02:00
stats.py dspace_statistics_api/stats.py: Use -isBot:true 2020-12-20 16:56:03 +02:00
util.py dspace_statistics_api/util.py: Add vim modeline 2020-12-20 16:31:52 +02:00