{ "$schema": "http://json-schema.org/draft-07/schema", "$id": "triggers-common-schema", "title": "Triggers Common Schema", "description": "Definitions for triggers in general", "$comment": "This schema structure follows the constraint re-use pattern described in: https://github.com/json-schema-org/json-schema-org.github.io/issues/77", "definitions": { "commonFieldNames": { "$comment": "This is intended to be included inside properties/allOf in order to model property inheritance", "enum": [ "_id", "created", "createdBy", "lastUpdated", "lastUpdatedBy", "name", "type", "enabled", "actionType", "actionId", "migrationVersion" ] }, "commonFields": { "$comment": "This is intended to be included inside a root-level allOf in order to model property inheritance", "additionalProperties": true, "type": "object", "properties": { "_id": { "$ref": "common-ops-schema#/definitions/ObjectId" }, "created": { "$ref": "common-ops-schema#/definitions/ISODate" }, "createdBy": { "$ref": "common-ops-schema#/definitions/userAccount" }, "lastUpdated": { "$ref": "common-ops-schema#/definitions/ISODate" }, "lastUpdatedBy": { "$ref": "common-ops-schema#/definitions/userAccount" }, "name": { "$ref": "common-ops-schema#/definitions/name" }, "type": { "type": "string" }, "enabled": { "$ref": "common-ops-schema#/definitions/enabled" }, "actionType": { "$ref": "common-ops-schema#/definitions/actionType" }, "actionId": { "$ref": "common-ops-schema#/definitions/ObjectId" } } }, "commonFieldsExport": { "additionalProperties": true, "type": "object", "properties": { "_id": { "$ref": "common-ops-schema#/definitions/ObjectId" }, "created": { "$ref": "common-ops-schema#/definitions/ISODate" }, "createdBy": { "type": "string" }, "lastUpdated": { "$ref": "common-ops-schema#/definitions/ISODate" }, "lastUpdatedBy": { "type": "string" }, "name": { "$ref": "common-ops-schema#/definitions/name" }, "type": { "type": "string" }, "enabled": { "$ref": "common-ops-schema#/definitions/enabled" }, "actionType": { "$ref": "common-ops-schema#/definitions/actionType" }, "actionId": { "$ref": "common-ops-schema#/definitions/ObjectId" }, "migrationVersion": { "type": "number" } } }, "anyTrigger": { "oneOf": [ { "$ref": "endpoint-schema" }, { "$ref": "eventSystem-schema" }, { "$ref": "manual-schema" }, { "$ref": "schedule-schema" } ] }, "anyTriggerExport": { "oneOf": [ { "$ref": "endpoint-schema-export" }, { "$ref": "eventSystem-schema-export" }, { "$ref": "manual-schema-export" }, { "$ref": "schedule-schema-export" } ] } } }