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
In cases where a crate provides a type and a request-guard implementation it is not possible to document endpoints using that type.
This was an error for the rocket_db_pools::Connection<T> type and fixed by implementing that trait in this crate in pr #104.
I have the same error now with a different type.
Obviously we cannot do that for every crate that interacts with rocket.
The only way to fix this would be to be able to skip some parameters in the route definition.
This was already requested in #85.
Sadly i am currently not able to create a pr for that but i would imagine it like so:
My really stupid, but working workaround is to define the same route again, documenting it, and removing the not working parameter.
// the actual route#[openapi]#[get("/", rank = 1)]pubfnindex(param:ExternalType) -> &'staticstr{// logic}// duplicated route without actual logic but incremented rank#[openapi]#[get("/", rank = 2)]pubfnindex_but_documented() -> &'staticstr{// nothing but a warning}
Obviously that is not really cool.
The only way is see to fix this would implement said ignore attributes.
What do you think?
The text was updated successfully, but these errors were encountered:
In cases where a crate provides a type and a request-guard implementation it is not possible to document endpoints using that type.
This was an error for the
rocket_db_pools::Connection<T>
type and fixed by implementing that trait in this crate in pr #104.I have the same error now with a different type.
Obviously we cannot do that for every crate that interacts with rocket.
The only way to fix this would be to be able to skip some parameters in the route definition.
This was already requested in #85.
Sadly i am currently not able to create a pr for that but i would imagine it like so:
My really stupid, but working workaround is to define the same route again, documenting it, and removing the not working parameter.
Obviously that is not really cool.
The only way is see to fix this would implement said ignore attributes.
What do you think?
The text was updated successfully, but these errors were encountered: