-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat/serde enum representation (#414)
Add support for all kinds of [serde enum reprensentations](https://serde.rs/enum-representations.html). Namely enhances existing enum variant support by adding support for `untagged` and `adjacently tagged` enum representations. ```rust #[serde(untagged)] enum Foo { Bar(i32), Baz(String), } #[serde(tag = "tag", content = "content")] enum Foo { One { n: i32 }, Two { bar: Bar }, } ``` Also update `ToSchema`'s serde attribute docs. Co-Authored-By: Philip Ahlberg <philipahlberg@gmail.com>
- Loading branch information
1 parent
e50da56
commit 28e64ad
Showing
5 changed files
with
902 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.