Skip to content

Instantly share code, notes, and snippets.

@emmanuel
Forked from singingwolfboy/pg-smart-tags-schema.json
Last active April 22, 2021 16:08
Show Gist options
  • Save emmanuel/c23fd8b1b11a92f84121295dfb52dfba to your computer and use it in GitHub Desktop.
Save emmanuel/c23fd8b1b11a92f84121295dfb52dfba to your computer and use it in GitHub Desktop.
JSON Schema for Postgraphile v4 smart tags JSON files
{
"title": "JSONPgSmartTags",
"type": "object",
"properties": {
"version": {
"type": "number",
"minimum": 1
},
"config": {
"type": "object",
"propertyNames": {
"enum": ["attribute", "class", "constraint", "extension", "index", "namespace", "procedure", "type"],
"description": "Supported database kinds for smart tags"
},
"additionalProperties": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"tags": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": { "type": "string" }
},
{
"enum": [true, null]
}
]
}
},
"description": {
"type": "string"
},
"attribute": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"tags": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": { "type": "string" }
},
{
"enum": [true, null]
}
]
}
},
"description": {
"type": "string"
}
}
}
},
"constraint": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"tags": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": { "type": "string" }
},
{
"enum": [true, null]
}
]
}
},
"description": {
"type": "string"
}
}
}
}
}
}
}
}
},
"required": ["version", "config"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment