Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keep datetime as string type in GET Request models #780

Merged
merged 5 commits into from
Jan 17, 2025

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.

2 participants