We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following url mapping add a URI directly below a resource using collection
group '/api', { '/employees'(resources: 'employee') { collection { '/search'(controller: 'employee', action: 'search', method: 'GET') } } }
Should generate the following result regarding the search action
Controller: employee | GET | /api/employees/create | Action: create | | GET | /api/employees/search | Action: search | | GET | /api/employees/${id}/edit | Action: edit | | POST | /api/employees | Action: save | | GET | /api/employees | Action: index | | DELETE | /api/employees/${id} | Action: delete | | PATCH | /api/employees/${id} | Action: patch | | PUT | /api/employees/${id} | Action: update | | GET | /api/employees/${id} | Action: show |
Controller: employee | GET | /api/employees/create | Action: create | | GET | /api/employees/${id}/edit | Action: edit | | GET | /api/employees/${employeeId}/search | Action: search | | POST | /api/employees | Action: save | | GET | /api/employees | Action: index | | DELETE | /api/employees/${id} | Action: delete | | PATCH | /api/employees/${id} | Action: patch | | PUT | /api/employees/${id} | Action: update | | GET | /api/employees/${id} | Action: show |
If I avoid using group the result of using collection within resource is the expected
'/api/employees'(resources: 'employee') { collection { '/search'(controller: 'employee', action: 'search', method: 'GET') } }
For the search action I get the following result
/api/employees/search
https://github.com/ilmoralito/url-mapping-report-demo
The text was updated successfully, but these errors were encountered:
I am also experiencing this, with grails 3.3.1
Sorry, something went wrong.
"collection" url mapping inside a "group" behaves the same as it is n…
8e03581
…ot in a group. Fixes #10844
ilopmar
Successfully merging a pull request may close this issue.
Steps to Reproduce
Expected Behaviour
The following url mapping add a URI directly below a resource using collection
Should generate the following result regarding the search action
Actual Behaviour
If I avoid using group the result of using collection within resource is the expected
For the search action I get the following result
/api/employees/search
Environment Information
Example Application
https://github.com/ilmoralito/url-mapping-report-demo
The text was updated successfully, but these errors were encountered: