You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is due to utoipa is not able to recognize pub bar: Option<fn(String) -> String>, type with fn argument as value while parsing ToSchema. This support could be added though and should be quite simple, but I might be wrong as well. For quick fix as well you can add #[schema(value_type=()] for example to get around the compile error.
juhaku
changed the title
Unable to ignore field
Unable to ignore field : compile error with fn field on a struct
Nov 14, 2024
Utoipa version: 5.2
Minimal code to replicate:
Build error:
Expected behavior: I'd at least hope field like this can be ignored and won't trigger a compilation error.
Workaround (create type that has subset of fields and alias it with
as
):The text was updated successfully, but these errors were encountered: