Replies: 1 comment
-
@helaan > Is it possible to disable Utoipa's repr detection on certain structs without disabling it on all structs? Long story short, such feature has not been planned and only way around this is to do some duplicate work for now e.g. another enum that does not use Though if there are enough interest for this such attribute for |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I'm running into issues where utoipa with the repr feature enabled is generating an openapi definition that is not compatible with the serde annotations I'm using. Because I'm using sqlx's Type trait I've added an #[repr(i8)] declaration, but I don't want to expose this enum directly to my API, so I derive Serialize/Deserialize for it. I did want to expose a few other enums, so these do use Serialize_repr/Deserialize_repr.
This generates a schema that suggests ints need to be used but the actual deserialization code expects strings.
Is it possible to disable Utoipa's repr detection on certain structs without disabling it on all structs?
Beta Was this translation helpful? Give feedback.
All reactions