Skip to content

Conversation

@vincentsarago
Copy link
Member

Related Issue(s):

Description:

This PR change the type for the datetime parameter in GET request for /search, /collection and /items endpoints.

with this change, The GET and POST request models behave similarly by setting type for string.

Copy link
Member

@gadomski gadomski left a comment

Choose a reason for hiding this comment

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

KISS 👍🏼

datetime: Optional[DateTimeType] = attr.ib(
default=None, converter=_datetime_converter
)
datetime: DateTimeQueryType = attr.ib(default=None, validator=_validate_datetime)
Copy link
Member Author

Choose a reason for hiding this comment

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

Technically we didn't had to add datetime attribute here, but we do it to keep the order of the attributes the same as before (mostly for openapi docs 🤷‍♂️)

@vincentsarago vincentsarago merged commit e3c138c into main Jan 17, 2025
8 checks passed
@vincentsarago vincentsarago deleted the feature/use-str-for-GET-datetime branch January 17, 2025 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants