lumeohq / xsd-parser-rs

A xsd/wsdl => rust code generator written in rust
Apache License 2.0
96 stars 34 forks source link

Compile error on some enums #130

Open smw-wagnerma opened 3 years ago

smw-wagnerma commented 3 years ago

I get compile error on some generated enums others seems fine:

`bea::beadto1::AuthentificationTypeSoapDTO` doesn't implement `std::fmt::Display`
the trait `std::fmt::Display` is not implemented for `bea::beadto1::AuthentificationTypeSoapDTO`
in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
required by `std::fmt::Display::fmt`

The generated code is derived from Debug, it should be fine:

#[derive(PartialEq, Debug, YaSerialize, YaDeserialize)]
#[yaserde(prefix = "beadto1", namespace = "beadto1: http://brak.de/bea/application/dto/soap/dto1")]
pub enum AuthentificationTypeSoapDTO {
    // deprecated
    #[yaserde(rename = "nPA")]
    Npa,
    // Authentifizierung über ein Zertifikat.
    Certificate,
    __Unknown__(String),
}

impl Default for AuthentificationTypeSoapDTO {
    fn default() -> AuthentificationTypeSoapDTO {
        Self::__Unknown__("No valid variants".into())
    }
}

impl Validate for AuthentificationTypeSoapDTO {}