Skip to content

Conversation

daladim
Copy link

@daladim daladim commented Jun 25, 2025

This change is related to #1312 and #1377.

Every so often, I'm hitting a TypeTree must have a path error. Usually, it can be worked around by creating a newtype that somehow is better supported by utoipa (see an example here).
I'm not versed enough in proc-macros to fix this myself. However, I have been using this trick, that at least points me at what type is not "understood" by utoipa.

Example of error message before:

TypeTree must have a path

Example of error message after:

utoipa does not understand this type, for which type_tree must have a path:: Type::Tuple { paren_token: Paren, elems: [Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { ident: "SomeCustomType", span: #0 bytes(174539..174557) }, arguments: PathArguments::None }] } }, Comma, Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { ident: "T", span: #0 bytes(174559..174560) }, arguments: PathArguments::None }] } }] }

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

Successfully merging this pull request may close these issues.

1 participant