Skip to content

DatetimeInterval pydantic model doesn't support open-ended date ranges #99

@phil-osk

Description

@phil-osk

Per the the opportunity spec and order spec, dateinterval should support open-ended date ranges where .. represents an open end (e.g., ../20250101, 20250101/..) as specced in RFC 3339.

Pydantic model is:
DatetimeInterval = Annotated[ tuple[AwareDatetime, AwareDatetime], BeforeValidator(validate_before), AfterValidator(validate_after), WrapSerializer(serialize, return_type=str), WithJsonSchema({"type": "string"}, mode="serialization"), ]

AwareDateTime does not allow for None or other representation that an item in the tuple does not exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions