Fix for ids not being escaped in paths in the Simple Rest Data Provider #10206
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.
Problem
Records may have ids with characters that break the Simple REST Data Provider paths if not escaped.
For example, a record with id "Post#123" has a getOne path of '/posts/Post#123' which is not desired.
IDs like this can occur when using single table inheritance with DynamoDB or with other document data stores.
Solution
The solution is to escape IDs in paths for getOne, update, updateMany, delete and deleteMany. An example path with escaped id is '/posts/Post%23123'.
Closes #10207
How To Test
Perform getOne, update, updateMany, delete and deleteMany with records that have escape-requiring ids e.g. 'Post#123'.
Additional Checks
master
for a bugfix, ornext
for a featureAlso, please make sure to read the contributing guidelines.