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
$ -> cargo check
Checking example-openapi-union v0.1.0 (/Users/promo/wd/poem/examples/openapi/union)
error[E0277]: the trait bound `MyObj: IsObjectType` is not satisfied
--> openapi/union/src/main.rs:25:8
|
25 | My(MyObj),
| ^^^^^ the trait `IsObjectType` is not implemented for `MyObj`
|
= help: the following other types implement trait `IsObjectType`:
A
B
note: required by a bound in `<TopObj as Type>::register::{closure#0}::_::{closure#0}::assert_impl_all`
--> openapi/union/src/main.rs:22:10
|
22 | #[derive(Union, Debug, PartialEq)]
| ^^^^^ required by this bound in `assert_impl_all`
= note: this error originates in the macro `poem_openapi::__private::static_assertions::assert_impl_all` which comes from the expansion of the derive macro `Union` (in Nightly builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0277`.
error: could not compile `example-openapi-union` (bin "example-openapi-union") due to 1 previous error
Expected Behavior
master...vpikulik:poem:union_is_object_type
Actual Behavior
Steps to Reproduce the Problem
cd poem/examples/openapi/union
cargo check
Specifications
How to solve
impl IsObjectType for MyObj {}
solves the problem
Should it be added to
Union
derive macro?The text was updated successfully, but these errors were encountered: