lumeohq / xsd-parser-rs

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

CLI produces incorrect Rust code #153

Open matzipan opened 6 months ago

matzipan commented 6 months ago

Using the following xsd file: ttps://sanaregistry.org/files/ndmxml_unqualified/ndmxml-3.0.0-opm-3.0.xsd

Command run: cargo run --bin xsd-parser -- -i ndmxml-3.0.0-opm-3.0.xsd

Git commit: 7c31c6e3e2ba21d2bc80aea93178a4aa276bb1ec.

On line 133, the following code is produced:

    #[derive(PartialEq, Debug, YaSerialize, YaDeserialize)]#[yaserde(prefix = "ndm", namespace = "ndm: urn:ccsds:schema:ndmxml")]

Note the missing new line.

lkirkwood commented 2 months ago

This code compiles with (at least with rustc 1.75.0) so it is not incorrect. It does look wrong though, so I submitted #161 to fix it.