I think RPC documentation should be separated from the C++ code itself.
It makes building more tools based on it needlessly complicated, and it also pads the RPC code too much.
I have been thinking how to separate the RPC docs strings from the code itself. My 3 ideas
- make some preprocessor macros and the documentation will be copied to the source code by the C++ pre-processor - that could be a good solution, but maybe hard to decypher?
- keep the docs at separate files (in plaintext/possibly even markup) and let bitcoind read them at runtime - that could create annoying dependencies and probably introduce parsing errors?
- keep the docs at separate files (in plaintext/markup) and "transpile" them somehow to the C++ code at make step
Do you think it's a good idea? And which of the three possible ways is best?