-
Type: Bug
-
Status: Resolved
-
Priority: Blocker
-
Resolution: Fixed
-
Affects Version/s: 10.10-HF57, 2021.14
-
Fix Version/s: 10.10-HF58, 2021.15
-
Component/s: Rest API
-
Release Notes Summary:Numeral values sent as a String value are allowed to update a Integer/Float property via the REST API
-
Backlog priority:1,000
-
Sprint:nxplatform #53
The purpose of NXP-30680 was to ensure that a real String value (not a number submitted as a String) would thrown an error, instead of saving the value as 0.
- Case which should still work
curl 'http://localhost:8080/nuxeo/api/v1/directory/nature?pageSize=0' \ -u Administrator:Administrator \ -X POST \ -H 'accept: text/plain,application/json, application/json' \ -H 'Content-Type: application/json' \ -H 'properties: *' \ --data-raw '{"entity-type":"directoryEntry","directoryName":"nature","properties":{"ordering":"10000000","obsolete":0,"id":"Teste","label":"Teste"}}'
- Case which should throw an exception
curl 'http://localhost:8080/nuxeo/api/v1/directory/nature?pageSize=0' \ -u Administrator:Administrator \ -X POST \ -H 'accept: text/plain,application/json, application/json' \ -H 'Content-Type: application/json' \ -H 'properties: *' \ --data-raw '{"entity-type":"directoryEntry","directoryName":"nature","properties":{"ordering":"foobar","obsolete":0,"id":"Teste","label":"Teste"}}'
We'll also need to revert WEBUI-638 as it was a pretty good sign that the fix from NXP-30680 did not target the proper use case.