As far as I understand the extension.json schema, it is currently not allowed to set templates for ResourceModules entries. I did not test whether my changes to extension.json in https://gerrit.wikimedia.org/r/#/c/227187/ validate, but they do work, so if they don't validate (as I expect), the "templates" property should be added to the schema.
Related Gerrit Patches:
|mediawiki/core : master||registration: Document 'templates' property of ResourceModules objects|
but they do work, so if they don't validate (as I expect), the "templates" property should be added to the schema.
Yup, the "ResourceModules" are sent directly to ResourceLoader with only a little bit of processing for path names and stuff.