Skip to content

Commit a7680af

Browse files
committed
fix(rust/signed_doc): update meta.schema.json with definitions for uuid v4 and v7
1 parent b22a672 commit a7680af

File tree

1 file changed

+26
-31
lines changed

1 file changed

+26
-31
lines changed

rust/signed_doc/meta.schema.json

Lines changed: 26 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,52 @@
22
{
33
"$schema": "http://json-schema.org/draft-07/schema#",
44
"description": "Catalyst signed document metadata json schema",
5-
"type": "object",
6-
"additionalProperties": false,
7-
"properties": {
8-
"type": {
5+
"definitions": {
6+
"uuidv4": {
97
"type": "string",
108
"format": "uuid",
119
"examples": [
1210
"0ce8ab38-9258-4fbc-a62e-7faa6e58318f"
1311
]
1412
},
15-
"id": {
13+
"uuidv7": {
1614
"type": "string",
17-
"format": "ulid",
15+
"format": "uuid",
1816
"examples": [
19-
"01JE99R792FWCQFZPHJH1R87RB"
17+
"0193ae7c-8131-7fe6-91f0-b451ea229b11"
2018
]
19+
}
20+
},
21+
"type": "object",
22+
"additionalProperties": false,
23+
"properties": {
24+
"type": {
25+
"$ref": "#/definitions/uuidv4"
26+
},
27+
"id": {
28+
"$ref": "#/definitions/uuidv7"
2129
},
2230
"ver": {
23-
"type": "string",
24-
"format": "ulid",
25-
"examples": [
26-
"01JE99R792FWCQFZPHJH1R87RB"
27-
]
31+
"$ref": "#/definitions/uuidv7"
2832
},
2933
"ref": {
3034
"anyOf": [
3135
{
3236
"type": "object",
3337
"properties": {
3438
"id": {
35-
"type": "string",
36-
"format": "ulid"
39+
"$ref": "#/definitions/uuidv7"
3740
}
3841
}
3942
},
4043
{
4144
"type": "object",
4245
"properties": {
4346
"id": {
44-
"type": "string",
45-
"format": "ulid"
47+
"$ref": "#/definitions/uuidv7"
4648
},
4749
"ver": {
48-
"type": "string",
49-
"format": "ulid"
50+
"$ref": "#/definitions/uuidv7"
5051
}
5152
}
5253
}
@@ -58,21 +59,18 @@
5859
"type": "object",
5960
"properties": {
6061
"id": {
61-
"type": "string",
62-
"format": "ulid"
62+
"$ref": "#/definitions/uuidv7"
6363
}
6464
}
6565
},
6666
{
6767
"type": "object",
6868
"properties": {
6969
"id": {
70-
"type": "string",
71-
"format": "ulid"
70+
"$ref": "#/definitions/uuidv7"
7271
},
7372
"ver": {
74-
"type": "string",
75-
"format": "ulid"
73+
"$ref": "#/definitions/uuidv7"
7674
}
7775
}
7876
}
@@ -84,21 +82,18 @@
8482
"type": "object",
8583
"properties": {
8684
"id": {
87-
"type": "string",
88-
"format": "ulid"
85+
"$ref": "#/definitions/uuidv7"
8986
}
9087
}
9188
},
9289
{
9390
"type": "object",
9491
"properties": {
9592
"id": {
96-
"type": "string",
97-
"format": "ulid"
93+
"$ref": "#/definitions/uuidv7"
9894
},
9995
"ver": {
100-
"type": "string",
101-
"format": "ulid"
96+
"$ref": "#/definitions/uuidv7"
10297
}
10398
}
10499
}
@@ -113,4 +108,4 @@
113108
"id",
114109
"ver"
115110
]
116-
}
111+
}

0 commit comments

Comments
 (0)