OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] (ODATA-841) Representation of Precision and Scale


    [ https://issues.oasis-open.org/browse/ODATA-841?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61092#comment-61092 ] 

Michael Pizzo edited comment on ODATA-841 at 10/15/15 4:51 PM:
---------------------------------------------------------------

Add "precision/scale" to primitive types table in 4.1.2.1, Primitive Properties.
Also add precision, scale and format (decimal) to "Price" in example 14 as per description.
In Example 8, add multipleOf, minimum, maximum, and precision to "DecimalValue"

Price in Example 44 looks correct, just a little weird at first (and thus good to have the example). Consider adding comments to example 44 explaining the weirdness
 
(also update numbering of examples)


was (Author: mikep):
Add "precision/scale" to primitive types table in 4.1.2.1, Primitive Properties.
Also add precision, scale and format (decimal) to "Price" in example 14 as per description.
In Example 8, add multipleOf, minimum, maximum, and precision to "DecimalValue"

Price in Example 44 looks correct, just a little weird at first (and thus good to have the example).
 
(also update numbering of examples)

> Representation of Precision and Scale
> -------------------------------------
>
>                 Key: ODATA-841
>                 URL: https://issues.oasis-open.org/browse/ODATA-841
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Improvement
>          Components: OData JSON CSDL
>    Affects Versions: V4.0_WD01
>         Environment: Applied
>            Reporter: Ralf Handl
>             Fix For: V4.0_WD01
>
>
> JSON Schema offers the keywords minimum, maximum, and multipleOf for fine-tuning the value range of numeric properties.
> While it is possible to translate Precision="5" and Scale="2" into
> - multipleOf: 1e-2
> - minimum: -999.99
> - maximum: 999.99
> it is rather hard for an OData client to re-engineer the precision and scale
> Similar for temporal values: here Precision="7" would have to be -translated into a regular expression
> - "pattern":"(^[^.]*$|[.][0-9]{1,7}$)"
> We could add the original scale and precision as extension keywords.
> And we could additonally opt to omit the rather cryptic JSON Schema representation that would only benefit JSON Schema validators.
> For example a property of type Edm.TimeOfDay with precision 9 would be represented as
> {
>   "type":"string", 
>   "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,9})?$",
>   "precision":9
> } 



--
This message was sent by Atlassian JIRA
(v6.2.2#6258)


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]