Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/edr_pydantic/extent.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from typing import Annotated
from typing import List
from typing import Optional
from typing import Union

from annotated_types import Len
from pydantic import AwareDatetime

from .base_model import EdrBaseModel
Expand All @@ -13,8 +15,7 @@ class Spatial(EdrBaseModel):


class Temporal(EdrBaseModel):
# TODO: Validate this list has two items (C.7. Temporal Object)
interval: List[List[AwareDatetime]]
interval: List[Annotated[List[AwareDatetime], Len(min_length=2, max_length=2)]]
# TODO: Validate this is a list of ISO 8601 single time, ISO 8601 time duration or ISO 8601 interval
values: List[str]
trs: str
Expand Down