Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
663 commits
Select commit Hold shift + click to select a range
1837af0
fix: write the type ids a property's @JsonTypeInfo gives the elements…
codeconsole Oct 18, 2026
d1c699e
fix: let the JSON converter's includes and excludes name a property b…
codeconsole Oct 18, 2026
d4758dd
test: write each Jackson feature through every way of writing JSON, w…
codeconsole Oct 18, 2026
acc4971
fix: write a PATH circular reference with its keys in the order the J…
codeconsole Oct 18, 2026
32693b0
fix: write "." for an object that refers to itself with the DEFAULT c…
codeconsole Oct 18, 2026
14b2d11
test: write beans that reach an object again through every way of wri…
codeconsole Oct 18, 2026
753da5e
fix: apply the JSON converter's includes and excludes for a proxy to …
codeconsole Oct 18, 2026
9068378
test: write domain class associations in full, and proxies that are n…
codeconsole Oct 18, 2026
01ba281
test: write each Jackson feature with a named configuration that has …
codeconsole Oct 18, 2026
42b7b7c
fix: write the JSON converter's circular references with their keys i…
codeconsole Oct 18, 2026
0cd5188
fix: count the JSON converter's DEFAULT circular reference in the JSO…
codeconsole Oct 18, 2026
a8db14e
test: the JSON writer's nesting depth counts the objects and arrays t…
codeconsole Oct 18, 2026
9cf08ba
fix: keep the includes of a proxy for one render, and apply them wher…
codeconsole Oct 18, 2026
e9298a6
fix: ask a domain class rendering about the class name and the versio…
codeconsole Oct 18, 2026
6181ccf
fix: write the type ids a property's @JsonTypeInfo gives the instance…
codeconsole Oct 18, 2026
10c8a4b
fix: write the legacy JSON converter's circular references as Grails …
codeconsole Oct 18, 2026
a343663
fix: find an object reached again by identity in the JSON converter, …
codeconsole Oct 18, 2026
699a501
fix: apply the includes of a proxy written as a deep association, wit…
codeconsole Oct 18, 2026
d7fcc00
fix: give the nesting depth of the writer a path-capturing writer wraps
codeconsole Oct 18, 2026
8883541
test: check the format aliases Grails registers with Spring MVC by on…
codeconsole Oct 18, 2026
5a156b3
fix: match each user agent grails.mime.disable.accept.header.userAgen…
codeconsole Oct 18, 2026
2203c20
fix: let a JsonRenderer bean of a domain class render deep, with the …
codeconsole Oct 18, 2026
4c5cfa7
fix: let render json: with an empty jsonConfiguration write with the …
codeconsole Oct 18, 2026
719ec47
fix: tell the JSON converter of a proxy DomainClassMarshaller unwraps…
codeconsole Oct 18, 2026
f7f2b6b
fix: reject a null mapper when a named JSON configuration registry is…
codeconsole Oct 18, 2026
61f8548
docs: say which JsonMapper binds request bodies, what an XML body bin…
codeconsole Oct 18, 2026
d9bad4f
docs: correct the withFormat reference on the Accept header, and say …
codeconsole Oct 18, 2026
f3fb612
fix: answer respond in the format its renderer was found for, not the…
codeconsole Oct 18, 2026
81f9691
test: check that XML errors look up no view, that the XML module regi…
codeconsole Oct 19, 2026
d4f499d
fix: write binary data, raw values, plain decimals and the properties…
codeconsole Oct 19, 2026
2f7c413
fix: parse the HAL bodies of a renderer's type with a default JsonSlu…
codeconsole Oct 19, 2026
7e88a37
fix: throw an IllegalStateException naming grails-xml when request.XM…
codeconsole Oct 19, 2026
fcde9ec
docs: say that the XML converter writes the class name only in its de…
codeconsole Oct 19, 2026
536498e
fix: let a plugin's fallback renderer replace the registry's own defa…
codeconsole Oct 19, 2026
17175a5
fix: find the JSON GSP views respond renders in a controller unit tes…
codeconsole Oct 19, 2026
edf2883
fix: answer respond in the first format the action lists that a rende…
codeconsole Oct 19, 2026
7355c67
fix: render a problem written as JSON for a client no other format se…
codeconsole Oct 19, 2026
a4243ae
fix: write a problem as application/problem+xml only for a client tha…
codeconsole Oct 19, 2026
619571e
test: check that the XML problem the fallback is compared with is the…
codeconsole Oct 19, 2026
1488923
fix: keep the methods Grails 8 compiled request.XML and request.JSON …
codeconsole Oct 19, 2026
f5e491f
fix: register the XML converter encodeAsXML creates by name for ahead…
codeconsole Oct 19, 2026
3f2e164
docs: say what a client that accepts only a problem type is answered …
codeconsole Oct 19, 2026
66969d4
docs: say which modules grails-web-boot brings with grails-xml
codeconsole Oct 19, 2026
0a6bbd0
test: check that Spring Boot's converter customizers reach the conver…
codeconsole Oct 19, 2026
94d8058
build: list grails-xml among the packages GitHub associates with the …
codeconsole Oct 19, 2026
d64534d
fix: configure the XML converter when the converters are initialized …
codeconsole Oct 19, 2026
93aba35
fix: write a problem in JSON for an Accept header of more types than …
codeconsole Oct 19, 2026
b7fd11c
fix: read the quality and version of a media type whatever the case o…
codeconsole Oct 19, 2026
b9bee01
fix: find Spring Boot's JsonMapper for the JSON converter as respond …
codeconsole Oct 19, 2026
08185ae
fix: read a Content-Type no configured type matches with its type in …
codeconsole Oct 19, 2026
cecc5f9
fix: reject an unregistered jsonConfiguration where a JSON GSP view r…
codeconsole Oct 19, 2026
778ce44
test: check that an application logs the legacy JSON parsing notice a…
codeconsole Oct 19, 2026
d7f07f3
docs: correct the Javadoc of JSONParser and MimeType.createDefaults, …
codeconsole Oct 19, 2026
6c136a9
fix: write the beans and lists of an XML problem as Spring does whate…
codeconsole Oct 19, 2026
5422cb2
test: check that the JSON converter's property filters keep the bean …
codeconsole Oct 19, 2026
ab7a6fb
docs: correct which withFormat block runs, the user agents read as pa…
codeconsole Oct 19, 2026
eb20995
docs: say what of the JSON mapper applies to request binding, and wha…
codeconsole Oct 19, 2026
02a37d7
docs: say which excludes a JsonCollectionRenderer applies on the lega…
codeconsole Oct 19, 2026
543c81f
docs: say that the XML converter writes an object that refers to itse…
codeconsole Oct 19, 2026
9847186
docs: name every module and plugin grails-web-boot brings with grails…
codeconsole Oct 19, 2026
0782d53
docs: describe the XML converter's settings that the configuration me…
codeconsole Oct 19, 2026
abc88ab
docs: show JSON-only formats in the Grails developer skill, with what…
codeconsole Oct 19, 2026
7bc4503
docs: say that respond writes problem XML where Spring MVC without ja…
codeconsole Oct 19, 2026
46b1d76
fix: give JSONWriter a constructor that pretty prints, so the guide n…
codeconsole Oct 19, 2026
c85445a
fix: refuse JavaScript dates with grails.converters.json.legacy false…
codeconsole Oct 19, 2026
631f9c0
fix: write validation errors without an errors JSON view as without J…
codeconsole Oct 19, 2026
1b102a9
fix: parse every JSON body as grails.databinding.json.jackson says, w…
codeconsole Oct 19, 2026
f3e64d4
build: neither publish nor document the test fixtures of grails-conve…
codeconsole Oct 19, 2026
ed9398a
fix: compare media type names ignoring case, so a creator registered …
codeconsole Oct 19, 2026
44ff746
fix: parse the XML bodies of a type no creator bean handles again, as…
codeconsole Oct 19, 2026
9fab42e
fix: write an XML problem with a bean unwrapped without a prefix, and…
codeconsole Oct 19, 2026
cf6a6aa
fix: use a Pattern listed among the user agents as it is, with its ow…
codeconsole Oct 19, 2026
943c3a2
fix: resolve a unit test request's format again when its content type…
codeconsole Oct 19, 2026
3757578
fix: describe in OpenAPI the 422 of validation errors that no errors …
codeconsole Oct 19, 2026
8ee1130
fix: write the validation errors no JSON view renders in the encoding…
codeconsole Oct 19, 2026
0f7c8f8
Ask a selective renderer in the type it would render in
codeconsole Oct 19, 2026
59b70f4
Report a JsonRenderer's marshalling failure as a ConverterException
codeconsole Oct 19, 2026
6683abf
Report a writer failure during a raw problem member as Spring does
codeconsole Oct 19, 2026
1a03cec
Keep the bean marker under a property's @JsonIncludeProperties
codeconsole Oct 19, 2026
f9e626e
Name grails-xml among the shell CLI's distribution projects
codeconsole Oct 19, 2026
79ae9ed
Respond with the application's renderers from an unwired controller
codeconsole Oct 19, 2026
1a07ac6
Let an XML renderer subclass render problems itself, as JSON's does
codeconsole Oct 19, 2026
0f76fbf
Write a JSON problem with Spring's converter, as Spring MVC does
codeconsole Oct 19, 2026
70b395a
Write a problem as JSON where the HTML view respond names is missing
codeconsole Oct 19, 2026
a2f4037
Escape control characters in legacy JSON as Grails 8 did
codeconsole Oct 19, 2026
1d53411
Write a scalar with the application's serializer for its type
codeconsole Oct 19, 2026
bbafded
Wrap the converter's root value where the mapper wraps root values
codeconsole Oct 19, 2026
c4c8ae5
Register the constructor of the JSON binding source creator for AOT
codeconsole Oct 19, 2026
1ece2c5
Test that JSON bodies no creator handles are parsed by the applicatio…
codeconsole Oct 19, 2026
d1f180e
Test that a HAL renderer bean reads the JSON binding setting
codeconsole Oct 19, 2026
4c9dbda
Test and document the beans web unit tests keep from the application
codeconsole Oct 19, 2026
cc77e1e
File the shared converter settings under JSON & Converters
codeconsole Oct 19, 2026
d0b113e
Assert the third JsonBuilder example of JSONBuilderSpec
codeconsole Oct 19, 2026
1144bdc
Describe the Accept order withFormat follows as the parser makes it
codeconsole Oct 19, 2026
3c737bc
Correct the binding docs and Javadoc the review found wrong
codeconsole Oct 19, 2026
3779620
Qualify what the problem and pretty-printing docs promise
codeconsole Oct 19, 2026
5d458bb
Mark more beans in the problem XML written without jackson-dataformat…
codeconsole Oct 19, 2026
3e57342
Report a checked exception of a JsonRenderer's marshaller as a conver…
codeconsole Oct 19, 2026
44dfa3f
Write PATH references in a wrapped root value by their path in the JS…
codeconsole Oct 19, 2026
ab9de44
Reset the converter's mapper when it is initialized for legacy JSON
codeconsole Oct 19, 2026
259bf4a
Test the lower-cased request type and the registry's match by name
codeconsole Oct 19, 2026
97e17b1
Correct the MIME docs the review found imprecise
codeconsole Oct 19, 2026
26e41c6
Bind a body only the application's mapper accepts in its creator spec
codeconsole Oct 19, 2026
8412a4b
Register what Spring injects into the JSON binding source creator for…
codeconsole Oct 19, 2026
4ec951e
Have a registry the application defines follow the JSON binding setting
codeconsole Oct 19, 2026
2bcbbbe
Leave a HAL renderer's bodies out of an application creator for anoth…
codeconsole Oct 19, 2026
2d3a61c
Complete the binding docs the review found incomplete
codeconsole Oct 19, 2026
86db13d
Correct the docs and metadata the review found out of step
codeconsole Oct 19, 2026
02221e9
Decode what a Jackson 2 converter writes as UTF-8
codeconsole Oct 19, 2026
8fda501
Test that respond restores the response type after asking a renderer
codeconsole Oct 19, 2026
3ede67c
Find an unwired controller's registry as autowiring finds it
codeconsole Oct 19, 2026
fa25f2e
Look up the HTML page of a problem as the GSP view resolver does
codeconsole Oct 19, 2026
cc8e580
Escape every string a JSONWriter writes as it escapes a String
codeconsole Oct 19, 2026
b27d55d
Replace the URL mappings plugin's link beans in web unit tests again
codeconsole Oct 19, 2026
1da5c6f
Describe the JSON validation errors the JSON settings make respond write
codeconsole Oct 19, 2026
b573005
Expect the redirect a form update answers with in the @Resource contr…
codeconsole Oct 19, 2026
f6e0e80
Write legacy JSON nested as deep as Grails 8 wrote it
codeconsole Oct 19, 2026
8877395
Test that a JSONWriter writes the text a Writable writes
codeconsole Oct 19, 2026
577a364
Find a problem's page named with its .gsp suffix, as the GSP resolver…
codeconsole Oct 19, 2026
f690d67
Write a problem without its page in the format the client negotiated
codeconsole Oct 19, 2026
51422f9
Give the second registry of the unwired controller spec nothing to re…
codeconsole Oct 19, 2026
cde9474
Describe the validation problem as Spring writes it in the OpenAPI do…
codeconsole Oct 19, 2026
e5b44a9
Register the constructor of the HAL binding source creator for AOT
codeconsole Oct 19, 2026
0661efe
Parse with Jackson where a HAL renderer is set to, without the setting
codeconsole Oct 19, 2026
7c165ef
Leave the HAL binding source creator out of the AOT hints again
codeconsole Oct 19, 2026
eb4c489
Test that an application/problem+xml body binds as XML
codeconsole Oct 19, 2026
d855ca9
Say that a creator for a class also handles the bodies of its subclasses
codeconsole Oct 19, 2026
2445b9d
Say why the data binding plugin sets the registry's Jackson default i…
codeconsole Oct 19, 2026
6238e1a
Say that a test request keeps a format the test set when its content …
codeconsole Oct 19, 2026
b79c6f0
Say that only an XML type listed after application/xml takes its place
codeconsole Oct 19, 2026
fbfbe6c
Say that any MimeTypeProvider bean keeps a problem type from its format
codeconsole Oct 19, 2026
ebe25a7
Keep a URL mappings holder or link generator a test declares under an…
codeconsole Oct 19, 2026
78bb7c9
Say which URL mappings holders a web unit test keeps
codeconsole Oct 19, 2026
db2c91a
Say that a mapper bean from beanRegistrar() is too late for Boot as well
codeconsole Oct 19, 2026
0b5af24
List the change of section 4 among those that apply whatever the sett…
codeconsole Oct 19, 2026
f22c8f5
Leave the marker out of a bean a property unwraps, whatever it ignores
codeconsole Oct 19, 2026
e7cf85d
Test the marker of a filtered bean the JSON converter's mapper writes…
codeconsole Oct 19, 2026
543f1dc
Recognize the marker of a bean written as an array wherever it is in …
codeconsole Oct 19, 2026
5e1eac8
Fail with a ConverterException where a value is nested deeper than th…
codeconsole Oct 19, 2026
114a028
Say that the read limits of the JSON parser are set on its factory
codeconsole Oct 19, 2026
b8bdcd2
Write every member of a problem in the XML Grails writes, also one wh…
codeconsole Oct 19, 2026
7986a5a
Say that the JSON mapper's settings decide the members of the problem…
codeconsole Oct 19, 2026
1517e0d
Keep the legacy parsing notice of the JSON binding source creators pr…
codeconsole Oct 19, 2026
2c1030f
Find a binding source creator registered for an interface of the targ…
codeconsole Oct 19, 2026
4fcc1e5
Read a request body as it is where the application's mapper unwraps r…
codeconsole Oct 19, 2026
8af5cae
Test that the data binding plugin gives its registry the Jackson defa…
codeconsole Oct 19, 2026
06e7fde
Describe the binding source creator interface and example as they are
codeconsole Oct 19, 2026
ea8d7e3
Find the renderer registry of an XML view where the application has s…
codeconsole Oct 19, 2026
9ecaf1f
Check that the second-registry spec has both registries
codeconsole Oct 19, 2026
1047523
Default the legacy setting of the OpenAPI settings to the converter's…
codeconsole Oct 19, 2026
a5570ea
Keep a bean a test's configuration class inherits as one the test dec…
codeconsole Oct 19, 2026
af91ab9
Say that a web unit test keeps any locale resolver its context has
codeconsole Oct 19, 2026
046657a
Say where the limits of the parser of request bodies are set
codeconsole Oct 19, 2026
8579423
Say that Grails 8 ignored a userAgents setting given as a string
codeconsole Oct 19, 2026
947fc51
Name the MIME methods Grails 9 removes or changes in the upgrade guide
codeconsole Oct 19, 2026
7020c0b
Mark only the extension members of a problem in the XML Grails writes
codeconsole Oct 19, 2026
267102c
Describe the marks of the problem XML as the mapper writes them
codeconsole Oct 19, 2026
4fc899f
Write the problem XML with the mapper of the JSON converter that writ…
codeconsole Oct 19, 2026
09a0ab2
Say that only a collection given to JSONWriter.value was written as J…
codeconsole Oct 19, 2026
1f54689
Give the JSON converter Jackson's limits where the application has no…
codeconsole Oct 19, 2026
29ba45a
Remove the import the converter initializer no longer uses
codeconsole Oct 19, 2026
18d4724
Write validation errors with their default messages where the convert…
codeconsole Oct 19, 2026
284a249
Negotiate a problem again as without a view where the page respond na…
codeconsole Oct 19, 2026
f500a4a
Answer a problem as Spring MVC does for a client whose Accept header …
codeconsole Oct 19, 2026
6d4fb50
Place the sentence on unreadable Accept headers after the clients it …
codeconsole Oct 19, 2026
2ee0ca4
Read a problem type as the format's own type, whatever order the conf…
codeconsole Oct 19, 2026
e327ebc
Say from which place a +xml type takes the place of application/xml
codeconsole Oct 19, 2026
7df46e4
Parse with Jackson where a HAL renderer is set to, also where Grails'…
codeconsole Oct 19, 2026
0975a9b
Keep the beans a JSON view unit test declares, as the web test traits…
codeconsole Oct 19, 2026
6b66f25
Fail a problem nested deeper than the JSON mapper writes in the XML G…
codeconsole Oct 19, 2026
7a943ad
Test the status alone for a named view in a format no renderer writes…
codeconsole Oct 19, 2026
dd33ff0
Say where respond answers a problem as Spring MVC does for an unreada…
codeconsole Oct 19, 2026
1824169
Read the legacy default in the OpenAPI spec without the JVM's properties
codeconsole Oct 19, 2026
5aa17b6
Fail a primitive array nested deeper than the JSON mapper writes in t…
codeconsole Oct 19, 2026
fa1bc97
Read the lists and whole numbers of a request body as the legacy pars…
codeconsole Oct 19, 2026
a0d8014
Write the problem XML with the mapper the JSON converter has for prob…
codeconsole Oct 19, 2026
6141f92
Check that an XML view renders with the registry respond writes with
codeconsole Oct 19, 2026
7374e61
Keep a bean of a static method a test's configuration class inherits
codeconsole Oct 19, 2026
78179b6
Test that a JSON view spec keeps beans it registers or its configurat…
codeconsole Oct 19, 2026
c23d529
Test the problem a named view leaves to the format Grails reads from …
codeconsole Oct 19, 2026
32cc942
Say how a problem type listed ahead of another type changes the format
codeconsole Oct 19, 2026
935d8be
Say where a problem type is read as application/json or application/xml
codeconsole Oct 19, 2026
948f168
Name the JSON mapper whose write limit the problem XML Grails writes …
codeconsole Oct 19, 2026
0d85917
Say how a renderer or binding source creator for an interface is foun…
codeconsole Oct 19, 2026
18842d5
Say how render json: reports a value or a writer that fails
codeconsole Oct 19, 2026
befd82c
Say that a JsonCollectionRenderer on the legacy path ignores the excl…
codeconsole Oct 19, 2026
1c90a59
Word the excludes of a JsonCollectionRenderer on the legacy path plainly
codeconsole Oct 19, 2026
7656a09
Say what the default mapper support of the legacy JSON writer is for
codeconsole Oct 19, 2026
fc8fdb1
Read a request body without the type ids of the application's JSON ma…
codeconsole Oct 19, 2026
5b01028
Negotiate the type of a problem with Spring MVC's content negotiation…
codeconsole Oct 19, 2026
f5caa41
Say what the JSON converter writes through with the legacy setting an…
codeconsole Oct 19, 2026
5220de6
Read a body with the application's own mapper where it has no default…
codeconsole Oct 19, 2026
da40589
Say that Grails reads the format of a rejected request from the request
codeconsole Oct 19, 2026
4fa3a41
Pin the problem-type examples of the guide against the default MIME t…
codeconsole Oct 19, 2026
d9221ca
Say which header Grails 8 resolved to all
codeconsole Oct 19, 2026
b534624
Say that respond writes a problem for a client that accepts only a pr…
codeconsole Oct 19, 2026
ff64e7b
Say that a binding source creator added to the registry for a problem…
codeconsole Oct 19, 2026
987a06b
Introduce the withFormat example as the header's order deciding
codeconsole Oct 19, 2026
a7d8ad4
Point the converter's additions to the sections that describe them
codeconsole Oct 19, 2026
365bcfb
Ask the converters about the class of a problem for its XML, as Sprin…
codeconsole Oct 19, 2026
49fff5e
Test that the JSON converter of a problem's XML is asked about the pr…
codeconsole Oct 19, 2026
a0829e9
Check the depth of the arrays the delegate writes whole alone
codeconsole Oct 19, 2026
3a814ce
Name what the second-registry XML view spec checks
codeconsole Oct 19, 2026
4950548
Derive the problem mapper once for each mapper the XML of problems is…
codeconsole Oct 19, 2026
6999185
Write the members of RFC 9457 in its namespace by the names the mappe…
codeconsole Oct 19, 2026
e2d71c2
Word the mapper the members of the problem XML follow plainly
codeconsole Oct 19, 2026
4800680
Fail a problem with a character XML cannot hold in the XML Grails writes
codeconsole Oct 19, 2026
80d0023
Keep only the beans of @Bean methods as the beans a test's configurat…
codeconsole Oct 19, 2026
db1e943
Negotiate the type of a problem in a web unit test as the application…
codeconsole Oct 19, 2026
3f4d64c
Name the problem types the upgrade guide says are read as application…
codeconsole Oct 19, 2026
ea80972
Say that a problem for a client of a format the action does not respo…
codeconsole Oct 19, 2026
d351422
Test that a problem is written in XML only where the action responds …
codeconsole Oct 19, 2026
b400a21
Write the text of the problem XML as the writer of Spring's XML conve…
codeconsole Oct 19, 2026
103b9a0
Tell the members of RFC 9457 in the problem XML by their getters, as …
codeconsole Oct 19, 2026
8511f44
Say in which type respond writes a problem for a client that sends on…
codeconsole Oct 19, 2026
e240de8
Say that the converter's mapper is installed as it is given
codeconsole Oct 19, 2026
dc9a4a7
Say which mapper of the JSON converter writes every enum by name
codeconsole Oct 19, 2026
02f59ea
Say how a web unit test reads the format parameter and applies the ne…
codeconsole Oct 19, 2026
b9480c6
Test that the problem XML takes the mapper the JSON converter selects…
codeconsole Oct 19, 2026
a30f1d4
Take the problem's mapper from the registration the JSON converter se…
codeconsole Oct 19, 2026
4223262
Write problems with Spring MVC's return value handler
codeconsole Oct 20, 2026
6eb92d4
Write a problem in JSON where Spring MVC has no XML converter
codeconsole Oct 20, 2026
6711b33
Answer an ErrorResponse respond is given as Spring MVC answers it
codeconsole Oct 20, 2026
eb33d5c
Give web unit tests Spring MVC's handler adapter
codeconsole Oct 20, 2026
c974ef9
Read the JSON prefix of a converter once
codeconsole Oct 20, 2026
b6a8045
Report each type the legacy converter writes with Spring JSON enabled
codeconsole Oct 20, 2026
1fd9e1d
Read the migration settings and their defaults from one place
codeconsole Oct 20, 2026
20d80ce
Bind JSON with the mapper Spring MVC reads a request body with
codeconsole Oct 20, 2026
6f0e233
Resolve the title and detail of a validation problem with the applica…
codeconsole Oct 20, 2026
c302ac4
Write the keys of a map association as Jackson writes those of a map
codeconsole Oct 20, 2026
fc5c6e8
Test that the XML encoder finds the XML converter of grails-xml
codeconsole Oct 20, 2026
085f560
Test respond end to end with the settings later releases default to
codeconsole Oct 20, 2026
932df60
Plan the JSON converter's Jackson rendering for Grails 10
codeconsole Oct 20, 2026
713e9ce
Write respond's JSON with Spring MVC's response body handler
codeconsole Oct 20, 2026
8ad6ea2
Resolve the exceptions of actions with Spring MVC's exception handlers
codeconsole Oct 20, 2026
e30e151
Fail the build where Jackson adds a method the gated writers do not f…
codeconsole Oct 20, 2026
1a57d26
Suppress the removal warning of the XML converter in the AOT hints of…
codeconsole Oct 20, 2026
308382d
Describe the problem response for validation errors as the opt-in it is
codeconsole Oct 20, 2026
30ba287
Find the method of an action its URL names with a URL converter
codeconsole Oct 20, 2026
31f7b77
Write what an action returns as Spring MVC writes it
codeconsole Oct 20, 2026
25a4633
Opt into writing the values of @ResponseBody actions
codeconsole Oct 20, 2026
c89dd8d
Write Spring XML through Spring MVC's response body handler
codeconsole Oct 20, 2026
2edf529
Apply the @JsonView of an action to what respond writes
codeconsole Oct 20, 2026
e8df1c3
Format the count of a validation problem's errors on Java 17 and 21
codeconsole Oct 21, 2026
785f668
Merge branch '9.0.x' into feature/spring-media-type-negotiation-8.0.x
codeconsole Oct 21, 2026
00e5455
Merge branch '9.0.x' into feature/spring-media-type-negotiation-8.0.x
codeconsole Oct 21, 2026
f6d5f9e
Format the English fallback of a validation problem in English
codeconsole Oct 21, 2026
6b59179
Say which JSON type an application's converter answers text/json with
codeconsole Oct 21, 2026
401c21c
Describe Spring MVC's exception handlers and responses in What's New
codeconsole Oct 21, 2026
36a1e7b
Name the spec that pins the fields MvcAdapter reads
codeconsole Oct 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/dependency-graph/external-references.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ references:
- purl: pkg:maven/org.apache.grails/grails-web-taglib
- purl: pkg:maven/org.apache.grails/grails-web-url-mappings
- purl: pkg:maven/org.apache.grails/grails-wrapper
- purl: pkg:maven/org.apache.grails/grails-xml
- purl: pkg:maven/org.apache.grails.data/grails-data-hibernate5
- purl: pkg:maven/org.apache.grails.data/grails-data-hibernate5-core
- purl: pkg:maven/org.apache.grails.data/grails-data-hibernate5-dbmigration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,11 @@ abstract class GenerateConfigurationMetadataTask extends DefaultTask {

@Override
RecordComponentVisitor visitRecordComponent(String name, String descriptor, String signature) {
model.properties[name] = new PropertyModel(
model.properties.put(name, new PropertyModel(
name: name,
type: fieldType(descriptor, signature),
constructorBound: true,
readable: true)
readable: true))
null
}

Expand All @@ -360,10 +360,10 @@ abstract class GenerateConfigurationMetadataTask extends DefaultTask {
boolean implicit = (parameterAccess & (Opcodes.ACC_SYNTHETIC | Opcodes.ACC_MANDATED)) != 0
int typeIndex = implicitParametersOmitted ? parameterIndex - implicitParameters : parameterIndex
if (parameterName && !implicit && typeIndex < argumentTypeNames.size()) {
constructor.properties[parameterName] = new PropertyModel(
constructor.properties.put(parameterName, new PropertyModel(
name: parameterName,
type: argumentTypeNames[typeIndex],
constructorBound: true)
constructorBound: true))
}
if (implicit) {
implicitParameters++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,39 @@ class ConfigurationMetadataPluginSpec extends Specification {
'''.stripIndent())
}

def 'a constructor parameter or record component named metaClass is a property, rather than a Groovy property of the model'() {
given:
resetFixture()
write('src/main/java/fixture/MetaClassArgument.java', '''
package fixture;

import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties("fixture.argument")
public class MetaClassArgument {
private final String metaClass;
public MetaClassArgument(String metaClass) { this.metaClass = metaClass; }
}
'''.stripIndent())
write('src/main/java/fixture/MetaClassRecord.java', '''
package fixture;

import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties("fixture.record")
public record MetaClassRecord(String metaClass) { }
'''.stripIndent())

when:
BuildResult result = run('generateConfigurationMetadata', '--max-workers=1', '-Dorg.gradle.jvmargs=-Xmx512m')
Map metadata = readMetadata()

then:
result.task(':generateConfigurationMetadata').outcome == TaskOutcome.SUCCESS
property(metadata, 'fixture.argument.metaClass').type == 'java.lang.String'
property(metadata, 'fixture.record.metaClass').type == 'java.lang.String'
}

def "generates canonical metadata across clean incremental edit and source deletion builds"() {
when: 'a clean jar is built'
BuildResult clean = run('clean', 'jar')
Expand Down
1 change: 1 addition & 0 deletions gradle/publish-root-config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ def publishedProjects = [
'grails-web-mvc',
'grails-web-taglib',
'grails-web-url-mappings',
'grails-xml',
// datastore
'grails-datamapping-async',
'grails-datamapping-core',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import grails.web.mime.MimeType
import grails.web.mime.MimeUtility
import grails.web.pages.GrailsLayoutSelector
import grails.web.pages.GrailsRenderViewMutator
import grails.web.render.NamedJsonRenderer
import org.grails.gsp.GroovyPageTemplate
import org.grails.io.support.SpringIOUtils
import org.grails.web.json.JSONElement
Expand Down Expand Up @@ -92,12 +93,28 @@ import static org.grails.plugins.web.controllers.metaclass.RenderDynamicMethod.T
@CompileStatic
trait ResponseRenderer extends WebAttributes {

static final String ARGUMENT_JSON = 'json'

static final String ARGUMENT_JSON_CONFIGURATION = 'jsonConfiguration'

private Collection<ActionResultTransformer> actionResultTransformers = []

private MimeUtility mimeUtility
private GrailsRenderViewMutator grailsRenderViewMutator
private GrailsLayoutSelector grailsLayoutSelector
private GrailsPluginManager pluginManager
private NamedJsonRenderer namedJsonRenderer

@Generated
@Autowired(required = false)
void setNamedJsonRenderer(NamedJsonRenderer namedJsonRenderer) {
this.namedJsonRenderer = namedJsonRenderer
}

@Generated
NamedJsonRenderer getNamedJsonRenderer() {
return namedJsonRenderer
}

@Generated
@Autowired(required = false)
Expand Down Expand Up @@ -251,6 +268,55 @@ trait ResponseRenderer extends WebAttributes {
webRequest.renderView = false
}

/**
* Renders the {@code json} argument with the default or a registered named Jackson configuration:
*
* <pre>render json: book, jsonConfiguration: 'catalog'</pre>
*
* Keyed off the argument map rather than an overload taking an object, so that no other
* two-argument render call can be captured by it.
*
* @param argMap the render arguments
* @param webRequest the current request
* @param response the response to write to
*/
@Generated
private void renderNamedJson(Map argMap, GrailsWebRequest webRequest, HttpServletResponse response) {
Object value = argMap.get(ARGUMENT_JSON)
// an empty name selects the default configuration, as it does for respond
String configurationName = argMap.get(ARGUMENT_JSON_CONFIGURATION)?.toString() ?: null
if (namedJsonRenderer == null) {
throw new IllegalStateException('No JSON renderer is available.')
}
if (configurationName && !namedJsonRenderer.contains(configurationName)) {
throw new IllegalArgumentException("Named JSON configuration [$configurationName] is not registered.")
}
String encoding = jsonEncoding(webRequest)
if (!applyContentType(response, argMap, value, false, encoding)) {
setContentType(response, MimeType.JSON.name, argMap.get(ARGUMENT_ENCODING)?.toString() ?: encoding)
}
try {
namedJsonRenderer.render(configurationName, value, response.writer,
(List<String>) argMap.get('includes'), (List<String>) argMap.get('excludes'))
response.writer.flush()
}
catch (IOException e) {
throw new ControllerExecutionException(
"I/O error rendering named JSON configuration [$configurationName].", e)
}
webRequest.renderView = false
}

/**
* The encoding of a JSON response, as {@code respond} and the JSON converter write it: {@code grails.converters.encoding},
* which defaults to UTF-8.
*/
@Generated
private static String jsonEncoding(GrailsWebRequest webRequest) {
return webRequest.attributes?.grailsApplication?.config?.getProperty('grails.converters.encoding', String,
DEFAULT_ENCODING) ?: DEFAULT_ENCODING
}

/**
* Render a response for the given named arguments
*
Expand All @@ -264,6 +330,11 @@ trait ResponseRenderer extends WebAttributes {
boolean statusSet = handleStatusArgument(argMap, webRequest, response)

def applicationAttributes = webRequest.attributes
// A JSONObject is a Map too: one with a top-level "json" key is a value to write, not render arguments.
if (!(argMap instanceof JSONElement) && argMap.containsKey(ARGUMENT_JSON)) {
renderNamedJson(argMap, webRequest, response)
return
}
if (argMap.containsKey(ARGUMENT_TEXT)) {
def textArg = argMap[ARGUMENT_TEXT]
applyContentType(response, argMap, textArg)
Expand Down Expand Up @@ -516,9 +587,14 @@ trait ResponseRenderer extends WebAttributes {
}

private boolean applyContentType(HttpServletResponse response, Map argMap, Object renderArgument, boolean useDefault) {
applyContentType(response, argMap, renderArgument, useDefault, DEFAULT_ENCODING)
}

private boolean applyContentType(HttpServletResponse response, Map argMap, Object renderArgument, boolean useDefault,
String defaultEncoding) {
boolean contentTypeIsDefault = true
String contentType = resolveContentTypeBySourceType(renderArgument, useDefault ? TEXT_HTML : null)
String encoding = DEFAULT_ENCODING
String encoding = defaultEncoding
if (argMap != null) {
if (argMap.containsKey(ARGUMENT_CONTENT_TYPE)) {
contentType = argMap.get(ARGUMENT_CONTENT_TYPE).toString()
Expand Down
Loading
Loading