jamesfredley opened a new pull request, #1206:
URL: https://github.com/apache/grails-spring-security/pull/1206

   ## Summary
   
   The `controllerAnnotations.staticRules` and `interceptUrlMap` documentation 
only shows `application.groovy` syntax. Grails 7 uses `application.yml` by 
default, and no YAML examples exist anywhere in the docs. This causes confusion 
when translating the Groovy list-of-maps syntax to YAML - a common mistake is 
omitting the `-` list indicator, which produces a `Map` instead of a 
`List<Map>` and triggers the error: "Static rules defined as a Map are not 
supported; must be specified as a List of Maps."
   
   ## Changes
   
   ### `securedAnnotations.adoc` - `controllerAnnotations.staticRules` section
   
   - Added YAML flow mapping example alongside existing Groovy example
   - Added YAML block mapping example showing expanded syntax
   - Added `[IMPORTANT]` admonition documenting the Map-vs-List-of-Maps pitfall 
with incorrect YAML example
   
   ### `configGroovyMap.adoc` - `interceptUrlMap` section
   
   - Added YAML example for `securityConfigType` configuration
   - Added YAML example for `interceptUrlMap` definition alongside existing 
Groovy example
   - Added YAML example for custom mappings
   
   ## Why This Matters
   
   The code in `AnnotationFilterInvocationDefinition.compileStaticRules()` 
accepts any `List<Map<String, Object>>` regardless of YAML syntax - both flow 
mapping (`{ }`) and block mapping work correctly. The issue is purely a 
documentation gap: users don't know how to write the YAML equivalent of the 
Groovy syntax, and YAML indentation mistakes are easy to make without examples 
to follow.
   
   ## Version
   
   7.0.x


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