codeconsole commented on PR #16237:
URL: https://github.com/apache/grails-core/pull/16237#issuecomment-6219026823

   @matrei Round 6 is addressed on d10a0db1fd (seven commits after the 9.0.x 
merge 81abe17b47). The module tests, Checkstyle and CodeNarc pass for the 
modules touched.
   
   **Blocking**
   1. 834020b655. `DefaultJsonRenderer` and `DefaultXmlRenderer` ask 
`getEffectiveIncludes`/`getEffectiveExcludes` for the lists; `JsonRenderer` and 
`XmlRenderer` override them. They feed both the projection and the decision to 
stay on the legacy converter. `ControllerJsonSerializationSpec` runs your 
`Account` case (`{"user":"ada"}` with the opt-in on), and 
`SpringXmlRendererSpec` runs the XML one.
   
   **Should fix**
   2. c0566dc453. Configured names are compared with `equalsIgnoreCase` in both 
`find`s, and the matched type takes the configured name. 
`AcceptHeaderParserSpec` and `RequestAndResponseMimeTypesApiSpec` use 
`application/vnd.Acme+json` as `Accept` and `Content-Type`, with `withFormat`. 
Section 10 also covers `Content-Type` now. `Accept: *` stays unmatched as in 
Grails 8, because Spring reads it as `*/*`.
   3. 1ea68671b0. `writeAssociationReference` unwraps only when it has no 
identifier. The spec uses an `EntityProxyHandler` whose unwrap throws, and 
asserts no unwrap happens.
   4. acc8c378bb. The plugin's factory bean is registered with `fallback()`, so 
an application bean of that type wins whatever its name. Section 8 shows `new 
ValidationProblemDetailFactory(true, messageSource)`.
   5. b814877d97. `DefaultXmlRenderer` skips the view check for `Errors`. The 
spec asserts the locator is never asked and the status is 422.
   6. d436a7b2f3. `render(Map)` skips the named-JSON branch for a `JSONElement`.
   7. c0566dc453. The bean method is `static` and takes an 
`ObjectProvider<MimeTypesHolder>`; the configurer builds its strategy on first 
use. `MimeTypesConfigurationSpec` runs your repro (`@EnableWebMvc`, a 
`MimeTypeProvider` that takes a `LocaleResolver`). I did not run it against the 
old code to see it fail.
   8. d10a0db1fd. `vndError.adoc` shows the legacy body as the Grails 9 default 
and the problem as the opt-in and Grails 10.
   9. d10a0db1fd. Blank line added, link added, and the chapter says its shapes 
are the Grails converters', not the Spring opt-ins'.
   
   **Minor**
   - `respond problem, jsonConfiguration:` answers as a problem (834020b655).
   - The fallback warning says why when the setting is already on, and 
`missingConvertersReported` is shared per registry (834020b655).
   - Section 4 lists `pretty.print`, `date` and `default.deep` as ignored 
settings, and says bean excludes apply (d10a0db1fd).
   - A `ProblemDetail` with no converters logs a specific warning, and section 
8 is qualified (834020b655, d10a0db1fd).
   - A narrowed proxy in a collection keeps its excludes (1ea68671b0).
   - Without `grails-xml`, section 3 lists the outcomes. I left 
`RestResponder`'s 404 for errors as it is, since it predates the PR.
   - `grails-xml` has `runtimeOnly project(':grails-databinding')` (b814877d97).
   - The XML warning now says "scheduled for removal", which matches the 
classes that are annotated (b814877d97).
   - The strategy no longer implements `ContentNegotiationStrategy`, and 
`resolveMediaTypes`/`resolveMimeTypes` are gone. Their tests were replaced by 
`response.format` features for the `format` parameter, `RESPONSE_FORMAT` and a 
bare `*` (c0566dc453).
   - The XHR check is exact, and the fallback strategy is built once per 
application (c0566dc453).
   - Nits: the `MessageSource` import, the stale feature names, 
`RespondJsonMarshallerRegistererSpec` on a nested `@Configuration`, the HAL and 
Atom wording, and the stray blank lines.
   
   **Earlier rounds**
   - R4 `ObjectProvider` resolution per response: a found locator or registry 
is kept, one registered later is still found.
   - R4 autowired properties: section 3 says `groovyPageLocator` and 
`rendererRegistry` are no longer autowired.
   - R4 manual provider in `XmlGrailsPlugin`: kept, since the plugin spec's 
bare bean factory does not process `@Autowired`.
   - R5 `grails-openapi`: `openApi.adoc` says its document does not follow 
`json.spring` or `xml.spring`.
   


-- 
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