jamesfredley commented on issue #10844:
URL: https://github.com/apache/grails-core/issues/10844#issuecomment-5945930169

   Fixed on `8.0.x`.
   
   A `collection` block nested under a grouped `resources` mapping was emitting 
the resource id. `group '/api' { '/employees'(resources: 'employee') { 
collection { '/search' ... } } }` produced 
`/api/employees/${employeeId}/search` instead of `/api/employees/search`.
   
   `UrlMappingBuilder.collection` now sets `isInCollection` around the nested 
mappings. `establishFullURI` appends the id wildcard only when that flag is 
false, so a collection route stays directly under the resource. 
`GroupedUrlMappingSpec."Test mapping with group and nested collection"` expects 
`http://localhost/g/bars/baz?barId=1`, not `/g/bars/1/baz`. The old id-in-path 
assertion was dropped in 6c1bc8c83 (2024-07-11, "feat!: Update to Groovy 4 
(#13532)"), which is where that closure started seeing the builder flag.
   
   That commit is in the 7.0.0 through 7.2.4 tags except `v7.0.16`, and in 
`v8.0.0-M1` through `v8.0.0-RC2`. Closing as fixed.
   


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