BUG - GET REST API returns strings for non-string primitives

russtrotter_
Confirmed Champ
Confirmed Champ

Here's the setup:

  • In Nuxeo Studio, create new Document Type "mydoc"
  • On Schema tab, add a field "foo" type "Boolean"
  • Save
  • In DM, update project from studio
  • Create a new "mydoc" in Document Management
  • Call REST API /nuxeo/api/v1/path/default-domain/workspaces/myworkspace/mydoc
  • In returned JSON, the field "foo" is returned as "true" or "false" (with the quotes)

By comparison, POSTing to the same API allows a JSON boolean to be posted. It would seem to be most useful if the GET API worked the same way.

When I get some time I'll go through the Nuxeo DM code and find the spot where this is ocurring and post follow-up comment on this question.

1 REPLY 1

russtrotter_
Confirmed Champ
Confirmed Champ

Dug through the nuxeo-features code base and found