Skip to content

Commit 3031f2f

Browse files
added basic root event schema profile. (#58)
1 parent f31bc37 commit 3031f2f

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"$id": "https://notify.nhs.uk/cloudevents/schemas/digital-letters/2025-10/nhs-notify-digital-letters.schema.json",
3+
"$schema": "https://json-schema.org/draft/2020-12/schema",
4+
"allOf": [
5+
{
6+
"$ref": "https://notify.nhs.uk/cloudevents/schemas/common/2025-10/nhs-notify-profile.schema.json"
7+
}
8+
],
9+
"description": "All events produced by Digital Letters ",
10+
"properties": {
11+
"profilepublished": {
12+
"const": "2025-10",
13+
"type": "string"
14+
},
15+
"profileversion": {
16+
"const": "0.1.0",
17+
"type": "string"
18+
},
19+
"source": {
20+
"description": "Event source for digital letters.",
21+
"examples": [
22+
"/nhs/england/notify/production/primary/data-plane/digital-letters"
23+
],
24+
"pattern": "^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digital-letters$",
25+
"type": "string"
26+
},
27+
"subject": {
28+
"description": "Path in the form customer/{id}/order/{id}/item/{id} where each {{id}} is a UUID (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).",
29+
"examples": [
30+
"customer/920fca11-596a-4eca-9c47-99f624614658/order/769acdd4-6a47-496f-999f-76a6fd2c3959/item/4f5e17c0-ec57-4cee-9a86-14580cf5af7d"
31+
],
32+
"pattern": "^customer/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}/order/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}/item/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
33+
"type": "string"
34+
},
35+
"type": {
36+
"description": "Concrete versioned event type string for this example event (.vN suffix).",
37+
"examples": [
38+
"uk.nhs.notify.digital.letters.new.letter.v1"
39+
],
40+
"pattern": "^uk\\.nhs\\.notify\\.digital\\.letters\\.[a-z0-9]+(?:\\.[a-z0-9]+)*\\.v[0-9]+$",
41+
"type": "string"
42+
}
43+
},
44+
"required": [
45+
"type",
46+
"source",
47+
"subject",
48+
"dataschema",
49+
"data"
50+
],
51+
"title": "NHS Notify Digtial Letters Events"
52+
}

0 commit comments

Comments
 (0)