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

Add support for chrono Weekday #1213

Open
yuki0418 opened this issue Nov 20, 2024 · 1 comment
Open

Add support for chrono Weekday #1213

yuki0418 opened this issue Nov 20, 2024 · 1 comment

Comments

@yuki0418
Copy link

yuki0418 commented Nov 20, 2024

Hi, I try to use ToSchema derive with chrono::WeekDay, but return error

the trait bound `chrono::Weekday: utoipa::ToSchema` is not satisfied
the following other types implement trait `utoipa::ToSchema`

Looks like chrono::Weekday not supported yet so I may create PR to add support like below PR?
#404

Or let me know if there is an another way for this.

@juhaku
Copy link
Owner

juhaku commented Nov 20, 2024

Looks like chrono::Weekday not supported yet so I may create PR to add support like below PR?

Yes, it is not supported as of now, you can create a PR like that to support it. alternatively you can alias it globally with utoipa-config or locally via value_type=... attribute. See example here #1205 (comment)

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

No branches or pull requests

2 participants