From 85b03ac1532378e7269c2d141331878fac699a05 Mon Sep 17 00:00:00 2001 From: Sean Brennan Date: Tue, 16 Jan 2024 11:46:40 -0500 Subject: [PATCH] Add ticket events Signed-off-by: Sean Brennan --- .spellcheck-en-custom.txt | 1 + continuous-operations.md | 120 ++++++++++++++++++++--- examples/ticket_closed.json | 27 ++++++ examples/ticket_created.json | 25 +++++ examples/ticket_updated.json | 26 +++++ schemas/ticketclosed.json | 182 +++++++++++++++++++++++++++++++++++ schemas/ticketcreated.json | 164 +++++++++++++++++++++++++++++++ schemas/ticketupdated.json | 165 +++++++++++++++++++++++++++++++ 8 files changed, 697 insertions(+), 13 deletions(-) create mode 100644 examples/ticket_closed.json create mode 100644 examples/ticket_created.json create mode 100644 examples/ticket_updated.json create mode 100644 schemas/ticketclosed.json create mode 100644 schemas/ticketcreated.json create mode 100644 schemas/ticketupdated.json diff --git a/.spellcheck-en-custom.txt b/.spellcheck-en-custom.txt index 3053b9c9..23556b78 100644 --- a/.spellcheck-en-custom.txt +++ b/.spellcheck-en-custom.txt @@ -18,6 +18,7 @@ Tekton URI UUID american +assignees br cardpane cdevent diff --git a/continuous-operations.md b/continuous-operations.md index 3c785754..7da2ab0c 100644 --- a/continuous-operations.md +++ b/continuous-operations.md @@ -8,32 +8,54 @@ description: > --> # Continuous Operations Events -Continuous Operations events are related to the operation of services deployed in target environments, tracking of incidents and their resolution. Incidents, and their resolution, can be detected by a number of different actors, like the end-user, a quality gate, a monitoring system, an SRE through a ticketing system or even the service itself. +Continuous Operations events are related to the operation of services deployed in target environments. ## Subjects -This specification defines one subject in this stage, the [`incident`](#incident). To quote the definition of the term from the NIST glossary, and [incident][] is: - -> An occurrence that actually or potentially jeopardizes the confidentiality, integrity, or availability of an information system or the information the system processes, stores, or transmits or that constitutes a violation or imminent threat of violation of security policies, security procedures, or acceptable use policies. +This specification defines two subjects in this stage: [`incident`](#incident) and [`ticket`](#ticket). Events associated to these subjects can be generated by a number of different actors, such as the end-user, an SRE, a quality gate, a monitoring system, or the service itself. | Subject | Description | Predicates | |---------|-------------|------------| -| [`incident`](#incident) | A problem in a production environment | [`detected`](#incident-detected), [`reported`](#incident-reported), [`resolved`](#incident-resolved)| +| [`incident`](#incident) | A problem in a production environment | [`detected`](#incident-detected), [`reported`](#incident-reported), [`resolved`](#incident-resolved) | +| [`ticket`](#ticket) | A ticket in a ticketing system | [`created`](#ticket-created), [`updated`](#ticket-updated), [`closed`](#ticket-closed) | ### `incident` -An `incident` represents a problem in a production environment. +An `incident` represents a problem in a production environment. To quote the definition of the term from the NIST glossary, an [incident][] is: + +> An occurrence that actually or potentially jeopardizes the confidentiality, integrity, or availability of an information system or the information the system processes, stores, or transmits or that constitutes a violation or imminent threat of violation of security policies, security procedures, or acceptable use policies. | Field | Type | Description | Examples | |-------|------|-------------|----------| | id | `String` | See [id](spec.md#id-subject)| `04896C75-F34D-40FF-A584-3F2B71CB9D47`, `issue123`, `risk-CVE123` | -| source | `URI-Reference` | See [source](spec.md#source-subject) | `region1/production`, `monitoring-system/metricA`| +| source | `URI-Reference` | See [source](spec.md#source-subject) | `region1/production`, `monitoring-system/metricA` | | type | `String` | See [type](spec.md#type-subject) | `incident` | -| description | `String` | Short, free style description of the incident | "Response time above 10ms", "New CVE-123 detected" | +| description | `String` | Short, free style description of the incident | `Response time above 10ms`, `New CVE-123 detected` | | environment | `Object` ([`environment`](./continuous-deployment.md#environment)) | Reference to the environment | `{"id": "production"}`, `{"id": "staging"}`, `{"id": "prod123", "source": "iaas-region-1"}` | | service | `Object` ([`service`](./continuous-deployment.md#service)) | Reference to the service | `{"id": "service123"}`, `{"id": "service123", "source": "region1/k8s/namespace"}` | | artifactId | `Purl` | Identifier of the artifact deployed with this service | `0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427`, `927aa808433d17e315a258b98e2f1a55f8258e0cb782ccb76280646d0dbe17b5`, `six-1.14.0-py2.py3-none-any.whl` | +### `ticket` + +A ticket can request a change, report a problem, or document an [`incident`](#incident). Any fields not defined by this spec may be included as `customData`. + +| Field | Type | Description | Examples | +|-------|------|-------------|----------| +| id | `String` | See [id](spec.md#id-subject)| `04896C75-F34D-40FF-A584-3F2B71CB9D47`, `ticket123`, `risk-CVE123` | +| source | `URI-Reference` | See [source](spec.md#source-subject) | `ticketing-system` | +| type | `String` | See [type](spec.md#type-subject) | `ticket` | +| summary | `String` | The summary provided on the ticket | `Implement feature xyz`, `New CVE-123 detected` | +| ticketType | `Enum or String` | The ticket type | `bug`, `enhancement`, `incident`, `task`, `question`, `custom-value` | +| group | `String` | The group or project the ticket is currently assigned to | `backend` | +| creator | `String` | The ticket author | `Alice` | +| assignees | `List (string)` | Who is currently investigating the ticket | `[Bob]` | +| priority | `Enum or String` | An indicator of the importance of the ticket | `high`, `medium`, `low`, `custom-value` | +| labels | `List (string)` | Labels associated to the ticket | `[productxyz, bug]` | +| milestone | `String` | An ID that represents a goal for when this ticket is to be completed | `123`, `sprint-123`, `Q1` | +| uri | `URI-Reference` | A link to the ticket itself | `https://example.issues.com/ticket123` | +| resolution | `Enum or String` | Indicates the closing status of the ticket | `completed`, `withdrawn`, `custom-value` | +| updatedBy | `String` | The person who updated the ticket | `Bob` | + ## Events ### [`incident detected`](examples/incident_detected.json) @@ -46,10 +68,10 @@ This event represents an incident that has been detected by a system or human. | Field | Type | Description | Examples | Mandatory ✅ | |-------|------|-------------|----------|----------------------------| -| id | `String` | See [id](spec.md#id-subject)| `04896C75-F34D-40FF-A584-3F2B71CB9D47`, `issue123`, `risk-CVE123` | ✅ | +| id | `String` | See [id](spec.md#id-subject)| `04896C75-F34D-40FF-A584-3F2B71CB9D47`, `ticket123`, `risk-CVE123` | ✅ | | source | `URI-Reference` | See [source](spec.md#source-subject) | `region1/production`, `monitoring-system/metricA`| | | type | `String` | See [type](spec.md#type-subject) | `incident` | | -| description | `String` | Short, free style description of the incident | "Response time above 10ms", "New CVE-123 detected" | | +| description | `String` | Short, free style description of the incident | `Response time above 10ms`, `New CVE-123 detected` | | | environment | `Object` ([`environment`](./continuous-deployment.md#environment)) | Reference to the environment | `{"id": "production"}`, `{"id": "staging"}`, `{"id": "prod123", "source": "iaas-region-1"}` | ✅ | | service | `Object` ([`service`](./continuous-deployment.md#service)) | Reference to the service | `{"id": "service123"}`, `{"id": "service123", "source": "region1/k8s/namespace"}` | | | artifactId | `Purl` | Identifier of the artifact deployed with this service | `0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427`, `927aa808433d17e315a258b98e2f1a55f8258e0cb782ccb76280646d0dbe17b5`, `six-1.14.0-py2.py3-none-any.whl` | | @@ -64,10 +86,10 @@ This event represents an incident that has been reported through a ticketing sys | Field | Type | Description | Examples | Mandatory ✅ | |-------|------|-------------|----------|----------------------------| -| id | `String` | See [id](spec.md#id-subject)| `04896C75-F34D-40FF-A584-3F2B71CB9D47`, `issue123`, `risk-CVE123` | ✅ | +| id | `String` | See [id](spec.md#id-subject)| `04896C75-F34D-40FF-A584-3F2B71CB9D47`, `ticket123`, `risk-CVE123` | ✅ | | source | `URI-Reference` | See [source](spec.md#source-subject) | `region1/production`, `monitoring-system/metricA`| | | type | `String` | See [type](spec.md#type-subject) | `incident` | | -| description | `String` | Short, free style description of the incident | "Response time above 10ms", "New CVE-123 detected" | | +| description | `String` | Short, free style description of the incident | `Response time above 10ms`, `New CVE-123 detected` | | | environment | `Object` ([`environment`](./continuous-deployment.md#environment)) | Reference to the environment | `{"id": "production"}`, `{"id": "staging"}`, `{"id": "prod123", "source": "iaas-region-1"}` | ✅ | | ticketURI | `URI` | URI of the ticket | `example.issues.com/ticket123` | ✅ | | service | `Object` ([`service`](./continuous-deployment.md#service)) | Reference to the service | `{"id": "service123"}`, `{"id": "service123", "source": "region1/k8s/namespace"}` | | @@ -86,9 +108,81 @@ This event represents an incident that has been resolved, meaning that the probl | id | `String` | See [id](spec.md#id-subject)| `04896C75-F34D-40FF-A584-3F2B71CB9D47`, `issue123`, `risk-CVE123` | ✅ | | source | `URI-Reference` | See [source](spec.md#source-subject) | `region1/production`, `monitoring-system/metricA`| | | type | `String` | See [type](spec.md#type-subject) | `incident` | | -| description | `String` | Short, free style description of the incident resolution | "Response time restored below 10ms", "CVE-123 acknowledged as non-exploitable" | | +| description | `String` | Short, free style description of the incident resolution | `Response time restored below 10ms`, `CVE-123 acknowledged as non-exploitable` | | | environment | `Object` ([`environment`](./continuous-deployment.md#environment)) | Reference to the environment | `{"id": "production"}`, `{"id": "staging"}`, `{"id": "prod123", "source": "iaas-region-1"}` | ✅ | | service | `Object` ([`service`](./continuous-deployment.md#service)) | Reference to the service | `{"id": "service123"}`, `{"id": "service123", "source": "region1/k8s/namespace"}` | | | artifactId | `Purl` | Identifier of the artifact deployed with this service | `0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427`, `927aa808433d17e315a258b98e2f1a55f8258e0cb782ccb76280646d0dbe17b5`, `six-1.14.0-py2.py3-none-any.whl` | | +### [`ticket created`](examples/ticket_created.json) + +This event represents a ticket that has been created within some ticketing system. + +- Event Type: __`dev.cdevents.ticket.created.0.1.0-draft`__ +- Predicate: created +- Subject: [`ticket`](#ticket) + +| Field | Type | Description | Examples | Mandatory ✅ | +| ------|----- | ----------- | ---------| ------------ | +| id | `String`| See [id](spec.md#id-subject) | `ticket-123` | ✅ | +| source | `URI-Reference` | See [source](spec.md#source-subject) | `ticketing-system` | | +| type | `String` | See [type](spec.md#type-subject) | `ticket` | | +| summary | `String` | The summary provided on the ticket | `Implement feature xyz`, `New CVE-123 detected` | ✅ | +| ticketType | `Enum or String` | The ticket type | `bug`, `enhancement`, `incident`, `task`, `question`, `custom-value` | | +| creator | `String` | The ticket author | `Alice` | ✅ | +| group | `String` | The group the ticket is currently assigned to | `backend` | | +| assignees | `List (string)` | Who is currently investigating the ticket | `[Bob]` | | +| priority | `Enum or String` | An indicator of the importance of the ticket | `high`, `medium`, `low`, `custom-value` | | +| labels | `List (string)` | Labels associated to the ticket | `[productxyz, bug]` | | +| milestone | `String` | An ID that represents a goal for when this ticket is to be completed | `123`, `sprint-123`, `Q1` | | +| uri | `URI-Reference` | A link to the ticket itself | `https://example.issues.com/ticket123` | ✅ | + +### [`ticket updated`](examples/ticket_updated.json) + +This event represents a ticket that has been created within some ticketing system. + +- Event Type: __`dev.cdevents.ticket.updated.0.1.0-draft`__ +- Predicate: updated +- Subject: [`ticket`](#ticket) + +| Field | Type | Description | Examples | Mandatory ✅ | +| ------|----- | ----------- | ---------| ------------ | +| id | `String`| See [id](spec.md#id-subject) | `ticket-123` | ✅ | +| source | `URI-Reference` | See [source](spec.md#source-subject) | `ticketing-system` | | +| type | `String` | See [type](spec.md#type-subject) | `ticket` | | +| summary | `String` | The summary provided on the ticket | `Implement feature xyz`, `New CVE-123 detected` | | +| ticketType | `Enum or String` | The ticket type | `bug`, `enhancement`, `incident`, `task`, `question`, `custom-value` | | +| creator | `String` | The ticket author | `Alice` | | +| group | `String` | The group the ticket is currently assigned to | `backend` | | +| assignees | `List (string)` | Who is currently investigating the ticket | `[Bob]` | | +| priority | `Enum or String` | An indicator of the importance of the ticket | `high`, `medium`, `low`, `custom-value` | | +| labels | `List (string)` | Labels associated to the ticket | `[productxyz, bug]` | | +| milestone | `String` | An ID that represents a goal for when this ticket is to be completed | `123`, `sprint-123`, `Q1` | | +| uri | `URI-Reference` | A link to the ticket itself | `https://example.issues.com/ticket123` | ✅ | +| updatedBy | `String` | The person who authored the updates | `Bob` | | + +### [`ticket closed`](examples/ticket_closed.json) + +This event represents a ticket that has been created within some ticketing system. + +- Event Type: __`dev.cdevents.ticket.closed.0.1.0-draft`__ +- Predicate: closed +- Subject: [`ticket`](#ticket) + +| Field | Type | Description | Examples | Mandatory ✅ | +| ------|----- | ----------- | ---------| ------------ | +| id | `String`| See [id](spec.md#id-subject) | `ticket-123` | ✅ | +| source | `URI-Reference` | See [source](spec.md#source-subject) | `ticketing-system` | | +| type | `String` | See [type](spec.md#type-subject) | `ticket` | | +| summary | `String` | The summary provided on the ticket | `Implement feature xyz`, `New CVE-123 detected` | | +| ticketType | `Enum or String` | The ticket type | `bug`, `enhancement`, `incident`, `task`, `question`, `custom-value` | | +| creator | `String` | The ticket author | `Alice` | | +| group | `String` | The group the ticket is currently assigned to | `backend` | | +| assignees | `List (string)` | Who is currently investigating the ticket | `[Bob]` | | +| priority | `Enum or String` | An indicator of the importance of the ticket | `high`, `medium`, `low`, `custom-value` | | +| labels | `List (string)` | Labels associated to the ticket | `[productxyz, bug]` | | +| milestone | `String` | An ID that represents a goal for when this ticket is to be completed | `123`, `sprint-123`, `Q1` | | +| uri | `URI-Reference` | A link to the ticket itself | `https://example.issues.com/ticket123` | ✅ | +| updatedBy | `String` | The person who authored the updates | `Bob` | | +| resolution | `Enum or String` | Indicates the closing status of the ticket | `completed`, `withdrawn`, `duplicate`, `custom-value` | ✅ | + [incident]: https://csrc.nist.gov/glossary/term/incident diff --git a/examples/ticket_closed.json b/examples/ticket_closed.json new file mode 100644 index 00000000..f8da5364 --- /dev/null +++ b/examples/ticket_closed.json @@ -0,0 +1,27 @@ +{ + "context": { + "version": "0.4.0-draft", + "id": "F4BD2B55-B6F6-4F44-AF72-BD2D0E7A8708", + "source": "/ticketing/system", + "type": "dev.cdevents.ticket.closed.0.1.0-draft", + "timestamp": "2022-11-11T13:52:20.079Z" + }, + "subject": { + "id": "ticket-123", + "source": "/ticketing/system", + "type": "ticket", + "content": { + "summary": "New CVE-123 detected", + "ticketType": "task", + "group": "security", + "creator": "Alice", + "assignees": ["Bob"], + "priority": "high", + "labels": ["bug"], + "milestone": "123", + "uri": "https://example.issues.com/ticket123", + "resolution": "completed", + "updatedBy": "Bob" + } + } +} diff --git a/examples/ticket_created.json b/examples/ticket_created.json new file mode 100644 index 00000000..4cbd599f --- /dev/null +++ b/examples/ticket_created.json @@ -0,0 +1,25 @@ +{ + "context": { + "version": "0.4.0-draft", + "id": "F4BD2B55-B6F6-4F44-AF72-BD2D0E7A8708", + "source": "/ticketing/system", + "type": "dev.cdevents.ticket.created.0.1.0-draft", + "timestamp": "2022-11-11T13:52:20.079Z" + }, + "subject": { + "id": "ticket-123", + "source": "/ticketing/system", + "type": "ticket", + "content": { + "summary": "New CVE-123 detected", + "ticketType": "task", + "group": "security", + "creator": "Alice", + "assignees": ["Bob"], + "priority": "high", + "labels": ["bug"], + "milestone": "123", + "uri": "https://example.issues.com/ticket123" + } + } +} diff --git a/examples/ticket_updated.json b/examples/ticket_updated.json new file mode 100644 index 00000000..60595ee7 --- /dev/null +++ b/examples/ticket_updated.json @@ -0,0 +1,26 @@ +{ + "context": { + "version": "0.4.0-draft", + "id": "F4BD2B55-B6F6-4F44-AF72-BD2D0E7A8708", + "source": "/ticketing/system", + "type": "dev.cdevents.ticket.updated.0.1.0-draft", + "timestamp": "2022-11-11T13:52:20.079Z" + }, + "subject": { + "id": "ticket-123", + "source": "/ticketing/system", + "type": "ticket", + "content": { + "summary": "New CVE-123 detected", + "ticketType": "task", + "group": "security", + "creator": "Alice", + "assignees": ["Bob"], + "priority": "high", + "labels": ["bug"], + "milestone": "123", + "uri": "https://example.issues.com/ticket123", + "updatedBy": "Bob" + } + } +} diff --git a/schemas/ticketclosed.json b/schemas/ticketclosed.json new file mode 100644 index 00000000..d3aedab8 --- /dev/null +++ b/schemas/ticketclosed.json @@ -0,0 +1,182 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://cdevents.dev/0.4.0-draft/schema/ticket-closed-event", + "properties": { + "context": { + "properties": { + "version": { + "type": "string", + "minLength": 1 + }, + "id": { + "type": "string", + "minLength": 1 + }, + "source": { + "type": "string", + "minLength": 1, + "format": "uri-reference" + }, + "type": { + "type": "string", + "enum": [ + "dev.cdevents.ticket.closed.0.1.0-draft" + ], + "default": "dev.cdevents.ticket.closed.0.1.0-draft" + }, + "timestamp": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "version", + "id", + "source", + "type", + "timestamp" + ] + }, + "subject": { + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "source": { + "type": "string", + "minLength": 1, + "format": "uri-reference" + }, + "type": { + "type": "string", + "minLength": 1, + "enum": [ + "ticket" + ], + "default": "ticket" + }, + "content": { + "properties": { + "summary": { + "type": "string" + }, + "ticketType": { + "anyOf": [ + { + "type": "string", + "enum": [ + "bug", + "enhancement", + "incident", + "task", + "question" + ] + }, + { + "type": "string" + } + ] + }, + "group": { + "type": "string" + }, + "creator": { + "type": "string", + "minLength": 1 + }, + "assignees": { + "type": "array", + "items": { + "type": "string" + } + }, + "priority": { + "anyOf": [ + { + "type": "string", + "enum": [ + "low", + "medium", + "high" + ] + }, + { + "type": "string" + } + ] + }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + }, + "milestone": { + "type": "string" + }, + "uri": { + "type": "string", + "minLength": 1, + "format": "uri-reference" + }, + "resolution": { + "anyOf": [ + { + "type": "string", + "enum": [ + "completed", + "withdrawn", + "duplicate" + ] + }, + { + "type": "string", + "minLength": 1 + } + ] + }, + "updatedBy": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "uri", + "resolution" + ] + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "id", + "type", + "content" + ] + }, + "customData": { + "oneOf": [ + { + "type": "object" + }, + { + "type": "string", + "contentEncoding": "base64" + } + ] + }, + "customDataContentType": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "context", + "subject" + ] +} diff --git a/schemas/ticketcreated.json b/schemas/ticketcreated.json new file mode 100644 index 00000000..a7c8d650 --- /dev/null +++ b/schemas/ticketcreated.json @@ -0,0 +1,164 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://cdevents.dev/0.4.0-draft/schema/ticket-created-event", + "properties": { + "context": { + "properties": { + "version": { + "type": "string", + "minLength": 1 + }, + "id": { + "type": "string", + "minLength": 1 + }, + "source": { + "type": "string", + "minLength": 1, + "format": "uri-reference" + }, + "type": { + "type": "string", + "enum": [ + "dev.cdevents.ticket.created.0.1.0-draft" + ], + "default": "dev.cdevents.ticket.created.0.1.0-draft" + }, + "timestamp": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "version", + "id", + "source", + "type", + "timestamp" + ] + }, + "subject": { + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "source": { + "type": "string", + "minLength": 1, + "format": "uri-reference" + }, + "type": { + "type": "string", + "minLength": 1, + "enum": [ + "ticket" + ], + "default": "ticket" + }, + "content": { + "properties": { + "summary": { + "type": "string" + }, + "ticketType": { + "anyOf": [ + { + "type": "string", + "enum": [ + "bug", + "enhancement", + "incident", + "task", + "question" + ] + }, + { + "type": "string" + } + ] + }, + "group": { + "type": "string" + }, + "creator": { + "type": "string", + "minLength": 1 + }, + "assignees": { + "type": "array", + "items": { + "type": "string" + } + }, + "priority": { + "anyOf": [ + { + "type": "string", + "enum": [ + "low", + "medium", + "high" + ] + }, + { + "type": "string" + } + ] + }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + }, + "milestone": { + "type": "string" + }, + "uri": { + "type": "string", + "minLength": 1, + "format": "uri-reference" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "summary", + "creator", + "uri" + ] + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "id", + "type", + "content" + ] + }, + "customData": { + "oneOf": [ + { + "type": "object" + }, + { + "type": "string", + "contentEncoding": "base64" + } + ] + }, + "customDataContentType": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "context", + "subject" + ] +} diff --git a/schemas/ticketupdated.json b/schemas/ticketupdated.json new file mode 100644 index 00000000..985e4ec3 --- /dev/null +++ b/schemas/ticketupdated.json @@ -0,0 +1,165 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://cdevents.dev/0.4.0-draft/schema/ticket-updated-event", + "properties": { + "context": { + "properties": { + "version": { + "type": "string", + "minLength": 1 + }, + "id": { + "type": "string", + "minLength": 1 + }, + "source": { + "type": "string", + "minLength": 1, + "format": "uri-reference" + }, + "type": { + "type": "string", + "enum": [ + "dev.cdevents.ticket.updated.0.1.0-draft" + ], + "default": "dev.cdevents.ticket.updated.0.1.0-draft" + }, + "timestamp": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "version", + "id", + "source", + "type", + "timestamp" + ] + }, + "subject": { + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "source": { + "type": "string", + "minLength": 1, + "format": "uri-reference" + }, + "type": { + "type": "string", + "minLength": 1, + "enum": [ + "ticket" + ], + "default": "ticket" + }, + "content": { + "properties": { + "summary": { + "type": "string" + }, + "ticketType": { + "anyOf": [ + { + "type": "string", + "enum": [ + "bug", + "enhancement", + "incident", + "task", + "question" + ] + }, + { + "type": "string" + } + ] + }, + "group": { + "type": "string" + }, + "creator": { + "type": "string", + "minLength": 1 + }, + "assignees": { + "type": "array", + "items": { + "type": "string" + } + }, + "priority": { + "anyOf": [ + { + "type": "string", + "enum": [ + "low", + "medium", + "high" + ] + }, + { + "type": "string" + } + ] + }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + }, + "milestone": { + "type": "string" + }, + "updatedBy": { + "type": "string" + }, + "uri": { + "type": "string", + "minLength": 1, + "format": "uri-reference" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "uri" + ] + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "id", + "type", + "content" + ] + }, + "customData": { + "oneOf": [ + { + "type": "object" + }, + { + "type": "string", + "contentEncoding": "base64" + } + ] + }, + "customDataContentType": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "context", + "subject" + ] +}