-
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.
Update openapi and landing page info
- Loading branch information
1 parent
939cfd0
commit f3d11d0
Showing
3 changed files
with
59 additions
and
9 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
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 |
---|---|---|
|
@@ -26,7 +26,11 @@ | |
from grpc_getter import get_ts_ag_request | ||
|
||
import datastore_pb2 as dstore | ||
from utilities import get_unique_values_for_metadata, seconds_to_iso_8601_duration, convert_cm_to_m | ||
from utilities import ( | ||
get_unique_values_for_metadata, | ||
seconds_to_iso_8601_duration, | ||
convert_cm_to_m, | ||
) | ||
|
||
logger = logging.getLogger(__name__) | ||
logger.setLevel(logging.INFO) | ||
|
@@ -56,14 +60,33 @@ def datetime_to_iso_string(value: datetime) -> str: | |
|
||
def get_landing_page(request): | ||
return LandingPageModel( | ||
title="E-SOH EDR API", | ||
description="The E-SOH EDR API", | ||
keywords=["weather", "temperature", "wind", "humidity", "pressure", "clouds", "radiation"], | ||
title="EDR Observations API Europe EUMETNET", | ||
description="OGC EDR API data service for European environmental observations from EUMETNET," | ||
" co-funded by the European Union.", | ||
keywords=[ | ||
"weather", | ||
"temperature", | ||
"wind", | ||
"humidity", | ||
"pressure", | ||
"clouds", | ||
"radiation", | ||
], | ||
provider=Provider(name="RODEO", url="https://rodeo-project.eu/"), | ||
contact=Contact(email="[email protected]"), | ||
links=[ | ||
Link(href=f"{request.url}", rel="self", title="Landing Page in JSON", type="application/json"), | ||
Link(href=f"{request.url}docs", rel="service-doc", title="API description in HTML", type="text/html"), | ||
Link( | ||
href=f"{request.url}", | ||
rel="self", | ||
title="Landing Page in JSON", | ||
type="application/json", | ||
), | ||
Link( | ||
href=f"{request.url}docs", | ||
rel="service-doc", | ||
title="API description in HTML", | ||
type="text/html", | ||
), | ||
Link( | ||
href=f"{request.url}openapi.json", | ||
rel="service-desc", | ||
|
@@ -76,7 +99,11 @@ def get_landing_page(request): | |
title="Conformance Declaration in JSON", | ||
type="application/json", | ||
), | ||
Link(href=f"{request.url}collections", rel="data", title="Collections metadata in JSON"), | ||
Link( | ||
href=f"{request.url}collections", | ||
rel="data", | ||
title="Collections metadata in JSON", | ||
), | ||
], | ||
) | ||
|
||
|
@@ -155,7 +182,14 @@ async def get_collection_metadata(base_url: str, is_self) -> Collection: | |
], | ||
extent=Extent( | ||
spatial=Spatial( | ||
bbox=[[spatial_extent.left, spatial_extent.bottom, spatial_extent.right, spatial_extent.top]], | ||
bbox=[ | ||
[ | ||
spatial_extent.left, | ||
spatial_extent.bottom, | ||
spatial_extent.right, | ||
spatial_extent.top, | ||
] | ||
], | ||
crs="EPSG:4326", | ||
), | ||
temporal=Temporal( | ||
|
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
openapi_metadata = { | ||
"title": "EDR Observations API Europe EUMETNET", | ||
"description": ( | ||
"OGC EDR API data service for European meteoroligical observations from EUMETNET," | ||
" co-funded by the European Union." | ||
), | ||
"contact": { | ||
"name": "EUMETNET", | ||
"url": "https://www.eumetnet.eu/about-us/", | ||
}, | ||
"license_info": { | ||
"name": "CC-BY-4.0", | ||
"url": "https://creativecommons.org/licenses/by/4.0/", | ||
}, | ||
} |
f3d11d0
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