I’m always wondering if templating is a good approach for solving this problem vs writing a program that generates the api object descriptions for you.
Tanka does generating, because it seems to be more robust, as the tool understands the output (instead of string substituting a fragile syntax)
See the docs on more details about generating: https://tanka.dev/tutorial/k-lib