Skip to content

Commit

Permalink
update manifest json schema
Browse files Browse the repository at this point in the history
  • Loading branch information
belopash authored Oct 28, 2024
1 parent 07aac87 commit 57f1c1d
Showing 1 changed file with 213 additions and 10 deletions.
223 changes: 213 additions & 10 deletions src/schemas/squid_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,62 @@
"$id": "https://cdn.subsquid.io/schemas/squid_manifest.json",
"$schema": "https://json-schema.org/draft-07/schema",
"additionalProperties": false,
"oneOf": [
{
"required": [
"slot"
]
},
{
"required": [
"version"
]
},
{
"required": [
"tag"
]
},
{
"not": {
"oneOf": [
{
"required": [
"slot"
]
},
{
"required": [
"version"
]
},
{
"required": [
"tag"
]
},
{
"required": [
"slot",
"version"
]
},
{
"required": [
"slot",
"tag"
]
},
{
"required": [
"version",
"tag"
]
}
]
}
}
],
"properties": {
"manifest_version": {
"const": "subsquid.io/v0.1"
Expand All @@ -10,13 +66,25 @@
"type": "string",
"minLength": 3,
"maxLength": 30,
"pattern": "^[a-z0-9][a-z0-9\\-]*[a-z0-9]$"
"pattern": "^[a-z0-9]([a-z0-9\\-]*[a-z0-9])?$"
},
"version": {
"type": "integer",
"maximum": 1000000,
"exclusiveMinimum": 0
},
"slot": {
"type": "string",
"minLength": 2,
"maxLength": 6,
"pattern": "^[a-z0-9]([a-z0-9\\-]*[a-z0-9])?$"
},
"tag": {
"type": "string",
"minLength": 2,
"maxLength": 32,
"pattern": "^[a-z0-9]([a-z0-9\\-]*[a-z0-9])?$"
},
"description": {
"type": "string"
},
Expand Down Expand Up @@ -85,6 +153,47 @@
"deploy": {
"type": "object",
"properties": {
"cors": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"default": true
},
"allow_origin": {
"type": "array",
"items": {
"type": "string"
}
},
"allow_methods": {
"type": "array",
"items": {
"type": "string"
}
},
"allow_headers": {
"type": "array",
"items": {
"type": "string"
}
},
"expose_headers": {
"type": "array",
"items": {
"type": "string"
}
},
"allow_credentials": {
"type": "boolean"
},
"max_age": {
"type": "integer",
"exclusiveMinimum": 0
}
},
"additionalProperties": false
},
"addons": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -123,6 +232,49 @@
},
"additionalProperties": false
},
"neon": {
"type": "object",
"properties": {
"version": {
"default": "16",
"const": "16"
}
},
"additionalProperties": false
},
"hasura": {
"type": [
"object",
"null"
],
"properties": {
"version": {
"type": "string",
"default": "latest"
},
"env": {
"type": "object",
"properties": {
"/^[a-zA-Z_][a-zA-Z0-9_]*$/": {
"type": "string",
"properties": {},
"required": [],
"additionalProperties": false
}
},
"additionalProperties": false,
"patternProperties": {
"^[a-zA-Z_][a-zA-Z0-9_]*$": {
"type": "string",
"properties": {},
"required": [],
"additionalProperties": false
}
}
}
},
"additionalProperties": false
},
"rpc": {
"type": "array",
"items": {
Expand All @@ -132,9 +284,9 @@
"aleph-zero.http",
"aleph-zero-testnet.http",
"amplitude.http",
"arbitrum-one.http",
"arbitrum-goerli.http",
"arbitrum-sepolia.http",
"arbitrum-one.http",
"arbitrum-nova.http",
"asset-hub-kusama.http",
"asset-hub-polkadot.http",
Expand Down Expand Up @@ -333,7 +485,7 @@
"properties": {
"name": {
"type": "string",
"pattern": "[a-z0-9]([-a-z0-9]*[a-z0-9])?",
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"maxLength": 63
},
"env": {
Expand Down Expand Up @@ -377,7 +529,7 @@
"properties": {
"name": {
"type": "string",
"pattern": "[a-z0-9]([-a-z0-9]*[a-z0-9])?",
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
"maxLength": 63
},
"env": {
Expand Down Expand Up @@ -481,6 +633,12 @@
"storage": {
"type": "string"
},
"autoresize": {
"type": "boolean"
},
"autoresize_limit": {
"type": "string"
},
"profile": {
"type": "string",
"enum": [
Expand All @@ -492,6 +650,57 @@
},
"additionalProperties": false
},
"hasura": {
"type": "object",
"properties": {
"replicas": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 5
},
"profile": {
"type": "string",
"enum": [
"small",
"medium",
"large"
]
}
},
"additionalProperties": false
},
"neon": {
"type": "object",
"properties": {
"autoscaling_limit_min_cu": {
"type": "string",
"default": "0.25",
"enum": [
"0.25",
"0.5",
"1",
"2",
"3",
"4",
"8"
]
},
"autoscaling_limit_max_cu": {
"type": "string",
"default": "0.25",
"enum": [
"0.25",
"0.5",
"1",
"2",
"3",
"4",
"8"
]
}
},
"additionalProperties": false
},
"rpc": {
"type": "object",
"description": "[DEPRECATED] Please use billing settings in Cloud UI",
Expand Down Expand Up @@ -529,10 +738,6 @@
},
"api": {
"type": "object",
"default": {
"replicas": 1,
"profile": "small"
},
"properties": {
"replicas": {
"type": "integer",
Expand All @@ -559,8 +764,6 @@
}
},
"required": [
"name",
"version",
"deploy"
],
"type": "object"
Expand Down

0 comments on commit 57f1c1d

Please sign in to comment.