Open gregsdennis opened 1 year ago
I agree that this should be implementation-defined. format
can be used to hint at a type that should be used and I expect an idl vocabulary would introduce additional formats such as i32
, f64
, etc for this purpose. OpenAPI has some like this in their format registry.
I think the best option is to leave association between JSON Schema constructs and built-in types to the implementation.
The implementation would have to define rules to recognized specific patterns which can map to types defined by their language.
We may be able to suggest several simplistic ones, like
{"type": "integer"}
maps to the 32-bit integer type, if there is one, but I don't know that JSON Schema will be able to specify more than that.