From b70e524ce5fa18a0f5dbf85fe91a3fb377b9aa14 Mon Sep 17 00:00:00 2001 From: Alexander Belopashentsev Date: Tue, 5 Sep 2023 22:39:05 +0500 Subject: [PATCH] create json schema for evm archive registry --- src/archives/evm.json | 3 +- src/schemas/archive-registry-evm.json | 58 +++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 src/schemas/archive-registry-evm.json diff --git a/src/archives/evm.json b/src/archives/evm.json index bc9d12f..3b52b61 100644 --- a/src/archives/evm.json +++ b/src/archives/evm.json @@ -1,4 +1,5 @@ { + "$schema": "../schemas/archive-registry-evm.json", "archives": [ { "network": "arbitrum", @@ -436,4 +437,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/src/schemas/archive-registry-evm.json b/src/schemas/archive-registry-evm.json new file mode 100644 index 0000000..5f146bc --- /dev/null +++ b/src/schemas/archive-registry-evm.json @@ -0,0 +1,58 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "type": "object", + "properties": { + "archives": { + "type": "array", + "items": { + "$ref": "#/definitions/archive" + } + } + }, + "required": [ + "archives" + ], + "definitions": { + "archive": { + "type": "object", + "properties": { + "network": { + "type": "string" + }, + "providers": { + "type": "array", + "items": { + "$ref": "#/definitions/provider" + } + } + }, + "required": [ + "network", + "providers" + ] + }, + "provider": { + "type": "object", + "properties": { + "provider": { + "type": "string" + }, + "dataSourceUrl": { + "type": "string", + "format": "uri" + }, + "release": { + "enum": [ + "FireSquid", + "ArrowSquid" + ] + } + }, + "required": [ + "provider", + "dataSourceUrl", + "release" + ] + } + } +} \ No newline at end of file