dcSpark / cardano-multiplatform-lib

Rust implementation of Cardano
MIT License
98 stars 36 forks source link

Missing JsonSchema for AssetName #286

Closed SebastienGllmt closed 9 months ago

SebastienGllmt commented 10 months ago

AssetName is defined in the following way

pub struct AssetName {
    pub inner: Vec<u8>,
    #[derivative(
        PartialEq = "ignore",
        Ord = "ignore",
        PartialOrd = "ignore",
        Hash = "ignore"
    )]
    #[serde(skip)]
    pub encodings: Option<AssetNameEncoding>,
}

This leads to the incorrectly generated JSON type

export interface AssetNameJSON {
  inner: number[];
}

To avoid this issue, we usually define JsonSchema for X to override the generated definition, but we're missing this for AssetName

SebastienGllmt commented 10 months ago

I looked through CML to see which types are effected. I feel like there are three types:

1. Types that have become { inner: ... }