json-schema-tools/transpiler

Rust: Enum should use internal tagging when types are the same

BelfordZ opened this issue ยท 1 comments

for example, we currently produce this:

pub type SimpleTypes = serde_json::Value;

which should infact be:

#[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq)]
pub enum SimpleTypes {
    #[serde(rename = "string")]
    String,
    #[serde(rename = "array")]
    Array,
    #[serde(rename = "object")]
    Object,
    #[serde(rename = "number")]
    Number,
    #[serde(rename = "boolean")]
    Boolean,
    #[serde(rename = "integer")]
    Integer
}

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

The release is available on:

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