cue
cue copied to clipboard
encoding/jsonschema: implement more format constraints
The format keyword in jsonschema could be implemented more fully.
As a very rough guide to prioritization, here are the set of formats used in schemastore.org, each with the count of how many schemas use that keyword (ignoring different versions of the same schema):
82 uri
26 date-time
20 uri-reference
14 regex
12 email
7 date
3 uuid
2 hostname
1 time
1 iri
1 ipv6
1 ipv4
1 int64
1 int32
1 duration
1 double
1 byte
Note that some of the formats used above are not actually recognized in JSON Schema. For example, int32 and int64 are OpenAPI-specific.