I have a rest-api app I am working on. I run generate-controller
on my domain, and a controller is generated, but in other profiles I have been able to "install" the templates that were used and customize them. This profile has no install templates command.
All attempts at doing this with the rest-api profile have been unsuccessful. I exported the templates that are used from the plugin jar and placed them in the file system, in a place grails could find them, but they are not used.
Should it be possible with this profile to customize the templates used for code generation - controller,service, view GSON? If so what does that project setup look like? I am working with a vanilla 4.0.0 rest-api profile project.
Section 10.5.3 in the documentation glosses over this, and contains a dead link to the scaffolding plugin, so it is of no help.
I tried to add the scaffolding plugin to my project build.gradle.
compile "org.grails.plugins:scaffolding"
but then the project won't even run.
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'abstractViewResolver' available
It seems like it ought to be possible to customize the code generation templates in the rest-api profile, but I can't find a working configuration/setup to do it. Any pointers would be greatly appreciated.
When I generate the scaffolding after adding the scaffolding plugin, and run install-templates, it installs the templates for a web profile, rather than rest-api, so they are of little use. And even after doing so, they are not used in generation.