lumeohq / xsd-parser-rs

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

issue-8: Add parsing value into validate functions #42

Closed LeonidKrutovsky closed 4 years ago

LeonidKrutovsky commented 4 years ago
LeonidKrutovsky commented 4 years ago

Something happened with struct comments in the output:

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

impl Validate for ColorOptionsChoice {}

            // Describe the colors supported. Either list each color or define the range of
// color values.
#[derive(Default, PartialEq, Debug, YaSerialize, YaDeserialize)]
#[yaserde(prefix = "tt", namespace = "tt: http://www.onvif.org/ver10/schema")]
pub struct ColorOptions {
    #[yaserde(attribute, rename = "any_attribute")]
    pub any_attribute: Option<String>,

    #[yaserde(flatten)]
    pub color_options_choice: ColorOptionsChoice,
}

impl Validate for ColorOptions {}

This issue is not presented in the master branch.

Good catch, man! I fixed it.