-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 2021.0, 2023.0
-
Component/s: Rest API
-
Release Notes Summary:The "nuxeo.primitive.type.strict.validation" nuxeo.conf property allows to throw an error when decoding a string input as a boolean.
-
Release Notes Description:
-
Tags:
-
Backlog priority:800
-
Sprint:nxplatform #116, nxplatform #117
-
Story Points:5
When a custom property of type Boolean is set in Studio Modeler with a True default value, this default should be used when a string other than "false" or "true" (whatever the case is) is provided when creating a document.
How to reproduce:
- In Studio Modeler, define a document type with a property of type Boolean and a default value set to true
- deploy to a Nuxeo instance
- using the Document REST API, create a document of type defined above, setting the boolean property to a random string:
curl -su Administrator:Administrator -XPOST \ -H "properties:*" -H 'Content-Type:application/json' \ -H 'accept: text/plain,application/json' \ http://localhost:8080/nuxeo/api/v1/repo/default/path/default-domain/workspaces/myworkspace \ -d '{ "entity-type": "document", "name": "MyDocType","type": "document-1", "properties": { "dc:title": "document-1", "mydoctype:booleanprop":"aaaaaaa" } }'
Expected result: an exception is thrown because the entered value does not match the property type.
Actual result: the document is created with the boolean property set to false
- is related to
-
NXP-32214 Throw an error if a String is used to query a Long/Integer field
- Resolved