-
Notifications
You must be signed in to change notification settings - Fork 219
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
KnownFormat disparity between utoipa and utoipa-gen #1175
Labels
Comments
Oh man, I must have missed it out, Need to check their correctness and add those missing. |
juhaku
added a commit
that referenced
this issue
Nov 1, 2024
This commit adds missing new formats introduced in OpenAPI 3.1 upgrade also to `utoipa-gen` macro parsing. Closes #1175
juhaku
added a commit
that referenced
this issue
Nov 1, 2024
This commit adds missing new formats introduced in OpenAPI 3.1 upgrade also to `utoipa-gen` macro parsing. Closes #1175
@jeff-hiner Now there is a PR to fix this, however you get the same result with providing custom format with literal str |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I noticed this when trying to apply
#[schema(format = Ipv4)]
inside the derive forToSchema
to an element of typestd::net::Ipv4Addr
. I got an error message saying it wasn't one of the supported types, even though it's present in utoipa 5:https://docs.rs/utoipa/latest/utoipa/openapi/schema/enum.KnownFormat.html
Apparently the enum inside utoipa-gen is distinct because it's in a proc-macro crate (named the same), and doesn't include this variant at all:
https://github.com/juhaku/utoipa/blob/master/utoipa-gen/src/schema_type.rs#L308
The text was updated successfully, but these errors were encountered: