Skip to content

Commit

Permalink
Refactor: Add examples to API docs for datetime
Browse files Browse the repository at this point in the history
  • Loading branch information
fjugipe committed Feb 7, 2024
1 parent 5cee99e commit 2fb606a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/routers/edr.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ async def get_locations(bbox: str = Query(..., example="5.0,52.0,6.0,52.1")) ->
async def get_data_location_id(
location_id: str = Path(..., example="06260"),
parameter_name: str = Query(None, alias="parameter-name", example="dd,ff,rh,pp,tn"),
datetime: str | None = None,
datetime: str = Query(None, example="2022-12-31T00:00Z/2023-01-01T00:00Z"),
f: str = Query(default="covjson", alias="f", description="Specify return format."),
):
# TODO: There is no error handling of any kind at the moment!
Expand Down Expand Up @@ -90,7 +90,7 @@ async def get_data_location_id(
async def get_data_position(
coords: str = Query(..., example="POINT(5.179705 52.0988218)"),
parameter_name: str = Query(None, alias="parameter-name", example="dd,ff,rh,pp,tn"),
datetime: str | None = None,
datetime: str = Query(None, example="2022-12-31T00:00Z/2023-01-01T00:00Z"),
f: str = Query(default="covjson", alias="f", description="Specify return format."),
):
point = wkt.loads(coords)
Expand All @@ -108,7 +108,7 @@ async def get_data_position(
async def get_data_area(
coords: str = Query(..., example="POLYGON((5.0 52.0, 6.0 52.0,6.0 52.1,5.0 52.1, 5.0 52.0))"),
parameter_name: str = Query(None, alias="parameter-name", example="dd,ff,rh,pp,tn"),
datetime: str | None = None,
datetime: str = Query(None, example="2022-12-31T00:00Z/2023-01-01T00:00Z"),
f: str = Query(default="covjson", alias="f", description="Specify return format."),
):
poly = wkt.loads(coords)
Expand Down

1 comment on commit 2fb606a

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API Unit Test Coverage Report
FileStmtsMissCoverMissing
\_\_init\_\_.py00100% 
datastore_pb2.py584621%23–68
datastore_pb2_grpc.py43430%2–225
dependencies.py22220%1–33
grpc_getter.py880%1–16
locustfile.py15150%1–31
main.py22220%3–51
metadata_endpoints.py19190%1–70
formatters
   \_\_init\_\_.py12650%16–32
   base_formatter.py7186%18
   covjson.py52198%69
routers
   \_\_init\_\_.py00100% 
   edr.py47470%2–126
   records.py00100% 
test
   test_covjson.py600100% 
TOTAL36523037% 

API Unit Test Coverage Summary

Tests Skipped Failures Errors Time
4 0 💤 0 ❌ 0 🔥 1.003s ⏱️

Please sign in to comment.