Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grails json-views: Make templates easier to debug and use #212

Open
rmorrise opened this issue May 17, 2019 · 1 comment
Open

Grails json-views: Make templates easier to debug and use #212

rmorrise opened this issue May 17, 2019 · 1 comment

Comments

@rmorrise
Copy link

rmorrise commented May 17, 2019

I find troubleshooting json-views extremely difficult. Here are some (hopefully small) concrete changes that would really improve the experience:

  • Add TRACE- or DEBUG-level logging to the template resolver logic. The log output should show which paths were tested and whether or not a template was found.
  • When invoking tmpl."/templateType/_templateType", the template resolver is converting it to a double-underscore: /templateType/__templateType. The framework should not do this.
  • Make sure all code paths attempt to use the template resolver. It seems like it doesn't always try to resolve templates for non-GORM objects.
  • I don't know why, but it keeps trying to resolve templates for java.lang.Long. It doesn't seem to do this for other built-in classes (like strings). This doesn't really hurt anything, but it makes debugging take longer.
  • Document the behavior for absolute VS relative template URIs
  • Document an example of rendering an array of items using parent and child templates (master-detail)
@jameskleeh
Copy link
Contributor

A PR would be welcome for any of these improvements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants