Spring data REST: Update a resource´s association using proper HTTP method
Correct answer is as my comment:
curl -v -X PUT -H "Content-Type: text/uri-list" -d "http://localhost:8080/rest/timedefinition/0" http://localhost:8080/rest/rules/70/timedefinition
There was a bug in spring-data-rest-webmvc:3.2.0-RELEASE
that would throw this error every time a PUT was sent to create 1-to-1 associations.
Changing spring-boot-starter-parent from 2.2.0.RELEASE
to 2.2.1.RELEASE
resolved this for me. You can also manually override spring-data-rest-webmvc
to 3.2.1.RELEASE
.
Related commit: https://github.com/spring-projects/spring-data-rest/commit/202a8aa30221b81dece183b74d81278deaf45321