Developing a good service requires many routine code and types to be written. Sometimes it is handy to define types (and code) in declarative way out-of-code in external contracts and generate types/code from that. It allows one to separate external contracts and business logic, and to define these contracts in language agnostic way.
You may use code generators for the following activity:
For embedding arbitrary data there is a userver_embed_file CMake function:
To use the embedded file from C++ just include the generated header and call utils::FindResource() function to get the embedded file contents: