Skip to content

Commit

Permalink
Add schema files
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
  • Loading branch information
afrittoli committed Jan 30, 2023
1 parent 49f4ca2 commit 84e8a0a
Show file tree
Hide file tree
Showing 2 changed files with 258 additions and 0 deletions.
129 changes: 129 additions & 0 deletions schemas/incidentdetected.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://cdevents.dev/0.2.0-draft/schema/incident-detected-event",
"properties": {
"context": {
"properties": {
"version": {
"type": "string",
"minLength": 1
},
"id": {
"type": "string",
"minLength": 1
},
"source": {
"type": "string",
"minLength": 1
},
"type": {
"type": "string",
"enum": [
"dev.cdevents.incident.detected.0.1.0-draft"
],
"default": "dev.cdevents.incident.detected.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"
},
"type": {
"type": "string",
"minLength": 1
},
"content": {
"properties": {
"description": {
"type": "string"
},
"environment": {
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"source": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"id"
]
},
"service": {
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"source": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"id"
]
},
"artifactId": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false,
"type": "object"
}
},
"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"
]
}
129 changes: 129 additions & 0 deletions schemas/incidentresolved.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://cdevents.dev/0.2.0-draft/schema/incident-resolved-event",
"properties": {
"context": {
"properties": {
"version": {
"type": "string",
"minLength": 1
},
"id": {
"type": "string",
"minLength": 1
},
"source": {
"type": "string",
"minLength": 1
},
"type": {
"type": "string",
"enum": [
"dev.cdevents.incident.resolved.0.1.0-draft"
],
"default": "dev.cdevents.incident.resolved.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"
},
"type": {
"type": "string",
"minLength": 1
},
"content": {
"properties": {
"description": {
"type": "string"
},
"environment": {
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"source": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"id"
]
},
"service": {
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"source": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"id"
]
},
"artifactId": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false,
"type": "object"
}
},
"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"
]
}

0 comments on commit 84e8a0a

Please sign in to comment.