Open HollayHorvath opened 2 weeks ago
Utoipa has Value
and Object
as reserved type names that will clash with other types if named similarly. Probably before utoipa
has been lenient on that, but now everything needs explicit implementation for ToSchema
which might have something to do with the error. This is due to fully support generics.
Value
and Object
types are used as meta names to indicate if type is just a json value or plain OpenAPI object. Changing this behavior would be a breaking change and needs further assessment what could be reasonable alternative for current behavior.
When I have a schema component with the name
Value
the#[derive(OpenApi)]
produces unparsable tokens:The repro itself is shorter than the error:
Renaming the
Value
struct fixes the issue.The error is quite hard to decipher as the error reported has nothing to do with the actual problem. It was working fine under Utoipa 4.x but it's broken under 5.0.