zeep icon indicating copy to clipboard operation
zeep copied to clipboard

Documentation does not specify all deps, dep versions

Open jhartzell42 opened this issue 4 years ago • 1 comments

The documentation says the outputted code requires yaserde, reqwest, and tokio. It does not mention that log, yaserde_derive and async-trait are also required. It also does not specify what versions this code has been tested with. There is no example cargo file for using with the output file, nor any code with a fully worked example, which would help clarify this issue.

jhartzell42 avatar Apr 06 '22 18:04 jhartzell42

As a minor tweak, yaserde has a yaserde_derive feature that seems to pull in the requisite functionality:

yaserde = { version = "0.11", features = ["yaserde_derive"] }

My current dependencies are (circa 2024-09, generated by zeep 0.1.10):

[dependencies]
async-trait = "0.1.82"
log = "0.4.22"
reqwest = "0.12.7"
xml = "0.8.20"
yaserde = { version = "0.11.0", features = ["yaserde_derive"] }

I also have to apply a few manual tweaks to get the generated code to build, handling reserved keywords and a missing dependency on the generated types:

sed -i'.bak' \
  -e 's/pub \(return\|type\):/pub r#\1:/' \
  -e 's/pub mod messages {/pub mod messages {\r    use super::types::*;/' \
  ./src/*.rs

NTmatter avatar Sep 02 '24 15:09 NTmatter