Open reneklacan opened 1 week ago
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.
For quick fix as well you can add #[schema(value_type=()] for example to get around the compile error.
That unfortunately doesn't work. It was one of the first things I tried, it still fails with the same error.
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
):