Newer
Older
ServerGenerator / src / server-generator.schema.json
{
    "$schema": "http://json-schema.org/schema#",
    "$id": "https://infinity.synoikos.de/schemata/server-generator.schema.json",
    "type": "object",
    "required": ["collections"],
    "title": "Description",
    "additionalProperties": false,
    "properties": {
        "$schema": {
            "type": "string",
            "enum": ["https://infinity.synoikos.de/schemata/server-generator.schema.json", "./server-generator.schema.json"]
        },
        "collections": {
            "type": "array",
            "items": {
                "title": "Collection",
                "type": "object",
                "required": ["name", "entities"],
                "additionalProperties": false,
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "entities": {
                        "title": "Entity",
                        "type": "object",
                        "required": ["name", "properties"],
                        "additionalProperties": false,
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "properties": {
                                "type": "array",
                                "items": {
                                    "title": "Property",
                                    "type": "object",
                                    "required": ["key", "isNullable", "type"],
                                    "additionalProperties": false,
                                    "uniqueItems": true,
                                    "properties": {
                                        "key": {
                                            "type": "string"
                                        },
                                        "isNullable": {
                                            "type": "boolean"
                                        },
                                        "type": {
                                            "type": "string",
                                            "enum": ["string"]
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}