diff --git a/api/main.py b/api/main.py index 25490db4..64e3312a 100644 --- a/api/main.py +++ b/api/main.py @@ -13,6 +13,7 @@ from routers import edr from routers import feature from utilities import create_url_from_request +from openapi.openapi_metadata import openapi_metadata from export_metrics import add_metrics @@ -30,7 +31,7 @@ def setup_logging(): logger = logging.getLogger(__name__) -app = FastAPI(swagger_ui_parameters={"tryItOutEnabled": True}) +app = FastAPI(swagger_ui_parameters={"tryItOutEnabled": True}, **openapi_metadata) app.add_middleware(BrotliMiddleware) add_metrics(app) diff --git a/api/openapi/openapi_metadata.py b/api/openapi/openapi_metadata.py new file mode 100644 index 00000000..f682d3ec --- /dev/null +++ b/api/openapi/openapi_metadata.py @@ -0,0 +1,31 @@ +openapi_metadata = { + "title": "Observations Europe EUMETNET", + "description": ( + "EDR data service for European environmental observations from EUMETNET," " co-funded by the European Union" + ), + "contacts": [ + { + "organization": "EUMETNET", + "addresses": [ + { + "deliveryPoint": ["Avenue Circulaire 3"], + "city": "Bruxelles", + "postalCode": "1180", + "country": "Belgique", + } + ], + "links": [ + { + "rel": "about", + "type": "text/html", + "href": "https://www.eumetnet.eu/about-us/", + } + ], + "roles": ["host"], + }, + ], + "license_info": { + "name": "CC-BY-4.0", + "url": "https://creativecommons.org/licenses/by/4.0/", + }, +}