134 lines
2.8 KiB
JSON
134 lines
2.8 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://khadhroony.local/schemas/store.config.schema.json",
|
|
"title": "Khadhroony Solana store configuration",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"default_profile",
|
|
"profiles"
|
|
],
|
|
"properties": {
|
|
"default_profile": {
|
|
"$ref": "#/$defs/non_empty_string"
|
|
},
|
|
"profiles": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"$ref": "#/$defs/profile"
|
|
}
|
|
}
|
|
},
|
|
"$defs": {
|
|
"non_empty_string": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"database": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"enabled",
|
|
"backend",
|
|
"postgres",
|
|
"sqlite"
|
|
],
|
|
"properties": {
|
|
"enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"backend": {
|
|
"type": "string",
|
|
"enum": [
|
|
"postgres",
|
|
"sqlite"
|
|
]
|
|
},
|
|
"postgres": {
|
|
"$ref": "#/$defs/postgres"
|
|
},
|
|
"sqlite": {
|
|
"$ref": "#/$defs/sqlite"
|
|
}
|
|
}
|
|
},
|
|
"postgres": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"url",
|
|
"max_connections",
|
|
"connect_timeout_ms",
|
|
"auto_initialize_schema"
|
|
],
|
|
"properties": {
|
|
"url": {
|
|
"$ref": "#/$defs/non_empty_string"
|
|
},
|
|
"max_connections": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"connect_timeout_ms": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"auto_initialize_schema": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"sqlite": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"path",
|
|
"create_if_missing",
|
|
"busy_timeout_ms",
|
|
"max_connections",
|
|
"auto_initialize_schema",
|
|
"use_wal"
|
|
],
|
|
"properties": {
|
|
"path": {
|
|
"$ref": "#/$defs/non_empty_string"
|
|
},
|
|
"create_if_missing": {
|
|
"type": "boolean"
|
|
},
|
|
"busy_timeout_ms": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"max_connections": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"auto_initialize_schema": {
|
|
"type": "boolean"
|
|
},
|
|
"use_wal": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"profile": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"name",
|
|
"database"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"$ref": "#/$defs/non_empty_string"
|
|
},
|
|
"database": {
|
|
"$ref": "#/$defs/database"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|