anixe / doku

fn(Code) -> Docs
MIT License
80 stars 5 forks source link

Collect aliases using the derive macro #31

Closed jarhodes314 closed 1 year ago

jarhodes314 commented 1 year ago

It's often useful to be able to document aliases for configuration fields, but doku currently ignores all of this information from serde. This PR adds support to collect this information so it can be accessed by the user of doku. It doesn't modify the generated toml/json documentation, it simply adds an aliases field to doku::Field

I couldn't find any prior art on tests which interact with the generated code other than printers or checking for compilation errors, so I added an integration test in a new file.

Patryk27 commented 1 year ago

Hi, thanks for preparing this change - looks great 😄 🚀