From a7680afae5c78a421c6fea8efb4178f4d96b7894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Rosales?= Date: Tue, 10 Dec 2024 17:35:03 -0600 Subject: [PATCH] fix(rust/signed_doc): update meta.schema.json with definitions for uuid v4 and v7 --- rust/signed_doc/meta.schema.json | 57 +++++++++++++++----------------- 1 file changed, 26 insertions(+), 31 deletions(-) diff --git a/rust/signed_doc/meta.schema.json b/rust/signed_doc/meta.schema.json index 88cfec84a..fad6bf93d 100644 --- a/rust/signed_doc/meta.schema.json +++ b/rust/signed_doc/meta.schema.json @@ -2,29 +2,33 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "description": "Catalyst signed document metadata json schema", - "type": "object", - "additionalProperties": false, - "properties": { - "type": { + "definitions": { + "uuidv4": { "type": "string", "format": "uuid", "examples": [ "0ce8ab38-9258-4fbc-a62e-7faa6e58318f" ] }, - "id": { + "uuidv7": { "type": "string", - "format": "ulid", + "format": "uuid", "examples": [ - "01JE99R792FWCQFZPHJH1R87RB" + "0193ae7c-8131-7fe6-91f0-b451ea229b11" ] + } + }, + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "$ref": "#/definitions/uuidv4" + }, + "id": { + "$ref": "#/definitions/uuidv7" }, "ver": { - "type": "string", - "format": "ulid", - "examples": [ - "01JE99R792FWCQFZPHJH1R87RB" - ] + "$ref": "#/definitions/uuidv7" }, "ref": { "anyOf": [ @@ -32,8 +36,7 @@ "type": "object", "properties": { "id": { - "type": "string", - "format": "ulid" + "$ref": "#/definitions/uuidv7" } } }, @@ -41,12 +44,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "format": "ulid" + "$ref": "#/definitions/uuidv7" }, "ver": { - "type": "string", - "format": "ulid" + "$ref": "#/definitions/uuidv7" } } } @@ -58,8 +59,7 @@ "type": "object", "properties": { "id": { - "type": "string", - "format": "ulid" + "$ref": "#/definitions/uuidv7" } } }, @@ -67,12 +67,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "format": "ulid" + "$ref": "#/definitions/uuidv7" }, "ver": { - "type": "string", - "format": "ulid" + "$ref": "#/definitions/uuidv7" } } } @@ -84,8 +82,7 @@ "type": "object", "properties": { "id": { - "type": "string", - "format": "ulid" + "$ref": "#/definitions/uuidv7" } } }, @@ -93,12 +90,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "format": "ulid" + "$ref": "#/definitions/uuidv7" }, "ver": { - "type": "string", - "format": "ulid" + "$ref": "#/definitions/uuidv7" } } } @@ -113,4 +108,4 @@ "id", "ver" ] -} \ No newline at end of file +}