json-schema-tools/transpiler

Rust: Enum of Enums need to use 'untagged' serde attr

Closed this issue ยท 2 comments

To properly serialize/deserialize enum of enums, we should use #[serde(untagged)]

to decide if the enum should be untagged, follow the heuristic of

"if the enum is a result of oneOf/anyOf/allOf, it should be untagged."
"if the enum is the result of type as array, it should be untagged."

๐ŸŽ‰ This issue has been resolved in version 1.8.0 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€