jdaugherty commented on code in PR #15234:
URL: https://github.com/apache/grails-core/pull/15234#discussion_r2537961038


##########
grails-rest-transforms/src/main/groovy/grails/rest/render/Renderer.groovy:
##########
@@ -39,5 +39,5 @@ interface Renderer<T> extends MimeTypeProvider {
      * @param object The object to render
      * @param context The {@link RenderContext}
      */
-    void render(T object, RenderContext context)
+    void render(Object object, RenderContext context)

Review Comment:
   Since this is part of the rest transforms, that means this is an API 
breaking change. I think we have to do this, but I'm wondering if it should be 
a 7.1.x bug fix and we just ship 7.1.x sooner.



##########
grails-test-examples/views-functional-tests/src/integration-test/groovy/functional/tests/BookSpec.groovy:
##########
@@ -56,22 +56,17 @@ class BookSpec extends HttpClientSpec {
         HttpClientResponseException e = thrown()
         e.response.status == HttpStatus.UNPROCESSABLE_ENTITY
         e.response.headers.getFirst(HttpHeaders.CONTENT_TYPE).isPresent()
-        // This has changed somewhere along the way
-        // e.response.headers.getFirst(HttpHeaders.CONTENT_TYPE).get() == 
'application/vnd.error;charset=UTF-8'
-        // to ->
-        e.response.headers.getFirst(HttpHeaders.CONTENT_TYPE).get() == 
'application/json;charset=UTF-8'
-        objectMapper.readTree(e.response.body().toString()) == 
objectMapper.readTree('''
+        e.response.headers.getFirst(HttpHeaders.CONTENT_TYPE).get() == 
'application/vnd.error;charset=UTF-8'
+        objectMapper.readTree(e.response.body().toString()) == 
objectMapper.readTree("""
             {
-                "errors": [
-                    {
-                        "object": "functional.tests.Book",
-                        "field": "title",
-                        "rejected-value": null,
-                        "message": "Property [title] of class [class 
functional.tests.Book] cannot be null"
-                    }
-                ]
-            }
-        ''')
+              "message": "Property [title] of class [class 
functional.tests.Book] cannot be null",

Review Comment:
   I assume if there isn't an error.gson, then it does render errors like 
before? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to