Document the PATCH mapping generated by resources and single - #16271
Merged
Conversation
DEFAULT_RESOURCES_INCLUDES generates eight mappings (index, create,
save, show, edit, update, patch, delete) and DEFAULT_RESOURCE_INCLUDES
generates seven, but the guide listed only seven and six. PATCH has
been generated since the action was introduced and was never documented,
including in the "Explicit REST Mappings" equivalence list.
Also corrects the nested resources table, which gave the edit URI as
/books/${bookId}/authors/edit/${id}. The generated mapping appends
/edit after the id, as asserted by RestfulResourceMappingSpec.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 8.0.x #16271 +/- ##
==================================================
+ Coverage 54.7070% 54.7228% +0.0158%
- Complexity 20423 20430 +7
==================================================
Files 2101 2101
Lines 100978 100978
Branches 17907 17907
==================================================
+ Hits 55242 55258 +16
+ Misses 37873 37857 -16
Partials 7863 7863 🚀 New features to boost your workflow:
|
🚨 TestLens detected 1 failed test 🚨Here is what you can do:
Test SummaryGroovy Snapshot Canary Build / Build Grails (shard 2) > :grails-test-examples-scaffolding:integrationTest
🏷️ Commit: 811f25e Test FailuresUserControllerSpec > User list (:grails-test-examples-scaffolding:integrationTest in Groovy Snapshot Canary Build / Build Grails (shard 2))Rerun ControlsNote Checks are currently running using the configuration below. Select tests to mute in this pull request: 🔲 UserControllerSpec > User list Reuse successful test results: 🔲 ♻️ Only rerun the tests that failed or were muted before Click the checkbox to trigger a rerun: 🔲 Rerun jobs Learn more about TestLens at testlens.app/docs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The guide documents seven mappings for
resourcesand six forsingle. Both generate one more —PATCHhas been generated since the action was added and was never documented, including in the "Explicit REST Mappings" equivalence list.is equivalent to eight mappings, not seven:
Adds the missing row to the
resources,singleand nested-resources tables in the URL mappings guide, and to the two action-convention tables in the REST section.Also corrects the nested-resources table, which gave the edit URI as
/books/${bookId}/authors/edit/${id}. The generated mapping appends/editafter the id, as asserted byRestfulResourceMappingSpec.