Book: Section on config-description
As requested in https://github.com/rust-cli/book/pull/166#discussion_r972045274 I'd like to open up a discussion about config description.
The general idea of what I call "config description" here is that a given configuration type can describe itself in a machine-readable way, which can ultimatively be rendered to user-documentation.
A user would ask the program "tell me how I can configure you?" and the program is then able to tell the user "I get configured via the following settings: 'greeting_message', which has to be a String, 'repeat', which has to be a number greater than zero".
A possible solution for this is sketched out in #166 using the type_description crate.
Alternatives
- In git-fixture, I use schemars to generate a schema
- In cargo-release, I provide a
--dump-configflag to show the user all layers of the config merged- This is more "documentation by example"
- Also allows the user to debug their configuration
- Provides transparency on defaults