{
    "$schema": "http://json-schema.org/draft-06/schema#",
    "title": "Integration Configuration",
    "description": "The schema used to generate integration configuration in Contentful",
    "type": "object",
    "properties": {
        "webhooks": {
            "type": "array",
            "title": "Managed Webhooks",
            "description": "A list of webhooks managed by this integration",
            "items": {
                "$ref": "#/definitions/webhook"
            }
        }
    },
    "additionalProperties": false,
    "definitions": {
        "webhook": {
            "type": "object",
            "title": "Managed Webhook",
            "description": "Configuration for setting up a webhook",
            "properties": {
                "endpointUrl": {
                    "type": "string",
                    "title": "Endpoint Url",
                    "format": "url",
                    "description": "The webhook destination"
                },
                "name": {
                    "type": "string",
                    "title": "Name",
                    "description": "The name of the webhook (e.g. Stripe Integration Entry Point)"
                }
            },
            "additionalProperties": false,
            "required": [
                "endpointUrl",
                "name"
            ]
        }
    }
}