Fix Avro integer to JSON type mapping in specification documentation
What is the purpose of the change
This pull request fix the mapping type between Avro Type and JSON type for integral numbers
Verifying this change
This change concerns only documentation
Documentation
- Does this pull request introduce a new feature? (no)
- If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
draft-bhutton-json-schema-validation-01 supports "type": "integer".
What justifies changing already released versions of the specification?
Standard ECMA-404 (The JSON Data Interchange Syntax) 2nd edition does not mention "integer". For numbers, it defines only syntax and does not specify which differences must or must not be ignored by parsers; for example, whether 1E0 is the same as 1E00.
draft-bhutton-json-schema-validation-01 supports
"type": "integer".What justifies changing already released versions of the specification?
This patch does not change the code of the released version. It only fixes the specifications available on the site. I propose to patch all the release documentation to provide proper website documentation for people who are not able to upgrade to the latest version immediately for some reason.
Standard ECMA-404 (The JSON Data Interchange Syntax) 2nd edition does not mention "integer". For numbers, it defines only syntax and does not specify which differences must or must not be ignored by parsers; for example, whether
1E0is the same as1E00.
The RFC8259 values does not defined integer as a valid type. All are include in numbers
Although the RFC does indeed not define an integer type, I think we should follow the JSON Schema spec on this:
intandlongcannot have a fractional part- whole numbers are ubiquitous enough to warrant a shorter definition than "number without a factional part"
Based on the ubiquity of integer numbers, one can even argue that the addition of integer in JSON schemas actually fixes an omission in the RFC (just as one can argue the opposite, because it makes the spec simpler).