Yes you are right, I really don't like to have to go to another file to find the definition of a macro.
However, this is still 'your' file and I will respect your way of doing it.
Not the way you propose though.
This has nothing to with mongo whatsoever.
I'd say the rest library is where the file should go.