spring-projects / spring-projects/spring-data-rest
Unable to append to a map [DATAREST-308]
@odrotbohm is already working on this.
Since Dec 31, 2020.
- Dominant language
- Java
- Stars
- 958
- Forks
- 568
- PR merge metrics
- No merged PRs in 30d
Description
Ian Duffy opened DATAREST-308 and commented
I am unable to append to a map entity through the default PATCH exposed by the rest exporter.
PATCH to the repository with the Content-Type of text/uri-list and a body of
+url-to-resource-to-add does work, however it sets the key on the map to "self"
I have attached a sample application. If you launch it and execute the following you should be able to reproduce
http://localhost:8080/integerAttributes
HTTP Method: POST
Content-Type: application/json
Request Body:
{
"contents": 1
}
http://localhost:8080/mapAttributes
HTTP Method: POST
Content-Type: application/json
Request Body:
{}
http://localhost:8080/mapAttributes/2/contents
HTTP Method: PATCH
Content-Type: text/uri-list
Request Body:
+http://localhost:8080/integerAttributes/1
Affects: 2.0.2 (Codd SR2), 2.1 GA (Dijkstra)
Attachments:
- restbucks.zip (10.06 kB)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.