You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "David Sautter (JIRA)" <ji...@apache.org> on 2014/05/06 11:04:15 UTC

[jira] [Commented] (THRIFT-809) Javascript client: Please make required fields actually required.

    [ https://issues.apache.org/jira/browse/THRIFT-809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13990450#comment-13990450 ] 

David Sautter commented on THRIFT-809:
--------------------------------------

structs are currently initialized with null-values. This is wrong in my opinion: Undefined properties should remain undefined, because the developer would expect that in JS!

> Javascript client: Please make required fields actually required. 
> ------------------------------------------------------------------
>
>                 Key: THRIFT-809
>                 URL: https://issues.apache.org/jira/browse/THRIFT-809
>             Project: Thrift
>          Issue Type: Improvement
>          Components: JavaScript - Compiler
>            Reporter: Jordan
>
> If fields are marked as required then I think that we should be forced to supply all of them, even if supplied with null values. Currently, I am able to construct an object without all of the required fields, send it to my backend, and nowhere does an error occur before sending. This should fail fast at the client. Instead, on the server I get null values. Null is so different than unspecified. 
> Thanks!



--
This message was sent by Atlassian JIRA
(v6.2#6252)