@wmfs/tymly-pg-plugin
Version:
Replace Tymly's out-the-box memory storage with PostgreSQL
83 lines (80 loc) • 2.15 kB
JSON
{
"id": "planets",
"title": "Planet",
"description": "A list of planets",
"primaryKey": ["name"],
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Unique planet name"
},
"title": {
"type": "string",
"description": "The display-label of the planet"
},
"type": {
"description": "What type of planet is this?",
"type": "string"
},
"diameter": {
"description": "The diameter of the planet, in metres",
"type": "number"
},
"color": {
"description": "What color is this planet?",
"type": "string"
},
"url": {
"type": "string",
"description": "Further reading available here!"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"moons": {
"type": "array",
"description": "Moons go around planets.",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The display-label of the moon"
},
"discoveredBy": {
"type": "string",
"description": "Name of the person who discovered the moon"
},
"discoveryYear": {
"type": "integer",
"description": "Year the moon was discovered (e.g. 1804)"
},
"craters": {
"type": "array",
"description": "Moons have craters",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The display-label of the crater"
},
"diameter": {
"type": "integer",
"description": "Diameter of the crater, in metres"
}
},
"required": ["name", "title"]
}
}
},
"required": ["name", "title"]
}
}
},
"required": ["name", "title"]
}