Skip to content

Conversation

zackyancey
Copy link

See #1471

This tells the compiler that the ToSchema macro looks at #[serde] attributes. Without it, structs annotated with #[serde] won't compile unless the struct also derives Serialize or Deserialize.

In cases where the Serialize/Deserialize are implemented manually but the schema can still be derived, it may be useful to use serde attributes that don't have a #[schema] equivalent, such as #[serde(untagged)].

This tells the compiler that the `ToSchema` macro looks at `#[serde]`
attributes. Without it, structs annotated with `#[serde]` won't compile
unless the struct also derives Serialize or Deserialize.

In cases where the Serialize/Deserialize are implemented manually but
the schema can still be derived, it may be useful to use serde
attributes that don't have a `#[schema]` equivalent, such as
`#[serde(untagged)]`.
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