[ https://issues.apache.org/jira/browse/OLINGO-793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14982251#comment-14982251 ]
Christian Amend commented on OLINGO-793: ---------------------------------------- Yes I had the same hope. As for the configuration option I think there are two parts we need to think about. First is the deserialization of payloads which are send by a client. Currently we throw an exception if the data does not match the facets which will result in a 400 Bad Request. Here we could provide a switch which deserializes the data regardless of the facet validity. I would not go as far as allowing different type kinds here. So even if someone turns the switch on a int value still hast to be an int value and not a string. Default here would be the facet validation is happening until you set the switch manually. Frameworks of specific server implementations could change this default. Second is the serialization of data which a server sends to a client. Again currently we throw an exception if the application provides data which does not conform to the facets. This is the default behaviour I would keep to make sure that services provide valid and complete data. Here we introduce a configuration option to change the behaviour as well. Either we take the data and format it according to the facets and accept data loss or we just take the value and put it in the payload without evaluation the facets. Here I am not sure which way to go. WDYT? >From a technical point of view the best place to introduce this swith is at >the Options class in the serializer methods in my opinion. Best Regards, Christian > Precision on EdmDateTimeOffset should be optional > ------------------------------------------------- > > Key: OLINGO-793 > URL: https://issues.apache.org/jira/browse/OLINGO-793 > Project: Olingo > Issue Type: Bug > Components: odata4-commons > Affects Versions: (Java) V4 4.0.0 > Reporter: Ramesh Reddy > > According to [1] the precision attribute on EdmdateTimeOffset is optional > facet that can be defined. However the code [2] fails with > IllegalArgumentException is it found to be null. > [1] > http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part3-csdl/odata-v4.0-errata02-os-part3-csdl-complete.html#_Toc406397957 > [2] > https://github.com/apache/olingo-odata4/blob/master/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTimeOffset.java#L253 -- This message was sent by Atlassian JIRA (v6.3.4#6332)