adobe / adobe/xdm

Recommendation on supporting int64/long values

Open
#427 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
266
Forks
380
Avg merge
5d 8h
Merged PRs (30d)
9

Description

The following discussions cover the issue of why a json-schema integer cannot be used to represent int64 or long numbers:

- https://github.com/json-schema-org/json-schema-spec/issues/574
- https://github.com/json-schema-org/json-schema-vocabularies/issues/45
- https://github.com/OAI/OpenAPI-Specification/issues/704

Is there a recommendation on how to define a schema that needs to support integers that support the full spectrum of int64/uint64?

The approach mentioned in the json-schema repo discussions has been to use strings and enhance the format support for such integer/decimal types. A reference approach taken by Google (https://developers.google.com/discovery/v1/type-format) follows a similar line however the format types used are not yet part of the standard.

Until a new draft of the spec is published to introduce these new formats, it would be good to have a recommendation in place.

Contributor guide

Open the contributing guide

Research direction

Start by reading the three linked JSON Schema and OpenAPI discussions, then compare the Google Discovery API type-format guidance cited in the issue. A useful outcome would be a documented recommendation for representing the full int64/uint64 range until standardized formats are available.

Written by the indexing model from the issue text.

Assessment

Tech stack
json
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.