{"action":"closed","issue":{"url":"https://api.github.com/repos/grails/grails-views/issues/51","repository_url":"https://api.github.com/repos/grails/grails-views","labels_url":"https://api.github.com/repos/grails/grails-views/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/grails/grails-views/issues/51/comments","events_url":"https://api.github.com/repos/grails/grails-views/issues/51/events","html_url":"https://github.com/grails/grails-views/issues/51","id":159450359,"number":51,"title":"Generate views using gson-views with RestfulController is missing update.gson and edit.gson","user":{"login":"ctoestreich","id":691357,"avatar_url":"https://avatars.githubusercontent.com/u/691357?v=3","gravatar_id":"","url":"https://api.github.com/users/ctoestreich","html_url":"https://github.com/ctoestreich","followers_url":"https://api.github.com/users/ctoestreich/followers","following_url":"https://api.github.com/users/ctoestreich/following{/other_user}","gists_url":"https://api.github.com/users/ctoestreich/gists{/gist_id}","starred_url":"https://api.github.com/users/ctoestreich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctoestreich/subscriptions","organizations_url":"https://api.github.com/users/ctoestreich/orgs","repos_url":"https://api.github.com/users/ctoestreich/repos","events_url":"https://api.github.com/users/ctoestreich/events{/privacy}","received_events_url":"https://api.github.com/users/ctoestreich/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/grails/grails-views/labels/invalid","name":"invalid","color":"e6e6e6"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-09T16:21:25Z","updated_at":"2016-07-20T09:22:01Z","closed_at":"2016-07-20T09:22:01Z","body":"When using a controller that extends RestfulController.  When running `generate-views` for a project the following are created for a domain class.\r\n\r\n<img width=\"274\" alt=\"screen shot 2016-06-09 at 11 07 14 am\" src=\"https://cloud.githubusercontent.com/assets/691357/15936902/59e8a5d4-2e32-11e6-9f8b-64ed9b3e3ba7.png\">\r\n\r\nHowever when doing an update via a post to the resource with an error, a view named `update.gson` in the folder is attempted to be shown.\r\n\r\nExample project here that had generate views run on Person domain class\r\n\r\n[https://github.com/ctoestreich/grails-rest-update](https://github.com/ctoestreich/grails-rest-update)\r\n\r\n### 1. Simply post a new person\r\n```\r\ncurl -X POST -H \"Content-Type: application/json\" -H \"Cache-Control: no-cache\" -H \"Postman-Token: a8b2c999-ff62-f6cf-7a31-a5537c207249\" -d '{\r\n  \"name\": \"Christian\"\r\n}' \"http://localhost:8080/persons\"\r\n```\r\n\r\n### 2. Update with invalid data\r\n```\r\ncurl -X PUT -H \"Content-Type: application/json\" -H \"Cache-Control: no-cache\" -H \"Postman-Token: 9705b150-cfb4-8bfd-721a-cc7219dea1fe\" -d '{\r\n  \"name\": \"\"\r\n}' \"http://localhost:8080/persons/1\"\r\n```\r\n\r\n```\r\nERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[grailsDispatcherServlet] - Servlet.service() for servlet [grailsDispatcherServlet] in context with path [] threw exception [Could not resolve view with name 'update' in servlet with name 'grailsDispatcherServlet'] with root cause\r\njavax.servlet.ServletException: Could not resolve view with name 'update' in servlet with name 'grailsDispatcherServlet'\r\n\tat org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1229)\r\n\tat org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1029)\r\n\tat org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:973)\r\n\tat org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:895)\r\n\tat org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967)\r\n\tat org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:880)\r\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:651)\r\n\tat org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843)\r\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:729)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)\r\n\tat org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)\r\n\tat org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration$ApplicationContextHeaderFilter.doFilterInternal(EndpointWebMvcAutoConfiguration.java:261)\r\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)\r\n\tat org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:115)\r\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)\r\n\tat org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:75)\r\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)\r\n\tat org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67)\r\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)\r\n\tat org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121)\r\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)\r\n\tat org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:103)\r\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)\r\n\tat org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)\r\n\tat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)\r\n\tat org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)\r\n\tat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)\r\n\tat org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)\r\n\tat org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)\r\n\tat org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)\r\n\tat org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)\r\n\tat org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)\r\n\tat org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1502)\r\n\tat org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1458)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n\tat org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n```"}}
{"actor":{"display_login":"graemerocher"}}