-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use openapi metadata in ladingpage metadata
- Loading branch information
1 parent
281d6c7
commit aadaee4
Showing
1 changed file
with
10 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,9 @@ | |
from utilities import seconds_to_iso_8601_duration | ||
from utilities import convert_cm_to_m | ||
|
||
from openapi.openapi_metadata import openapi_metadata | ||
|
||
|
||
logger = logging.getLogger(__name__) | ||
logger.setLevel(logging.INFO) | ||
|
||
|
@@ -58,9 +61,8 @@ def datetime_to_iso_string(value: datetime) -> str: | |
|
||
def get_landing_page(request): | ||
return LandingPageModel( | ||
title="EDR Observations API Europe EUMETNET", | ||
description="OGC EDR API data service for European environmental observations from EUMETNET," | ||
" co-funded by the European Union.", | ||
title=openapi_metadata["title"], | ||
description=openapi_metadata["description"], | ||
keywords=[ | ||
"weather", | ||
"temperature", | ||
|
@@ -70,8 +72,11 @@ def get_landing_page(request): | |
"clouds", | ||
"radiation", | ||
], | ||
provider=Provider(name="RODEO", url="https://rodeo-project.eu/"), | ||
contact=Contact(email="[email protected]"), | ||
provider=Provider( | ||
name=openapi_metadata["contact"]["name"], | ||
url=openapi_metadata["contact"]["url"], | ||
), | ||
contact=Contact(email=openapi_metadata["contact"]["email"]), | ||
links=[ | ||
Link( | ||
href=f"{request.url}", | ||
|
aadaee4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unit Test Coverage Report