|
27 | 27 | }, |
28 | 28 | "source": { |
29 | 29 | "title": "Event Source", |
30 | | - "description": "Logical event producer path starting /data-plane or /control-plane followed by lowercase segments.", |
31 | | - "examples": [ |
32 | | - "/data-plane/ordering", |
33 | | - "/control-plane/audit" |
34 | | - ], |
| 30 | + "description": "Logical event producer path within the supplier-api domain", |
35 | 31 | "type": "string", |
36 | | - "minLength": 12, |
37 | | - "pattern": "^\\/(data-plane|control-plane)(?:\\/[a-z0-9-]+)*$" |
| 32 | + "pattern": "^\\/data-plane\\/supplier-api(?:\\/.*)?$" |
38 | 33 | }, |
39 | 34 | "subject": { |
40 | 35 | "title": "Event Subject", |
41 | 36 | "description": "Resource path (no leading slash) within the source made of segments separated by '/'.", |
42 | 37 | "examples": [ |
43 | | - "origin/920fca11-596a-4eca-9c47-99f624614658/order/769acdd4-6a47-496f-999f-76a6fd2c3959/item/4f5e17c0-ec57-4cee-9a86-14580cf5af7d" |
| 38 | + "letter-origin/letter-rendering/letter/f47ac10b-58cc-4372-a567-0e02b2c3d479" |
44 | 39 | ], |
45 | 40 | "type": "string", |
46 | | - "minLength": 5, |
47 | | - "pattern": "^[^\\/]+(\\/[^\\/]+)*$" |
| 41 | + "pattern": "^letter-origin\\/[a-z0-9-]+\\/letter\\/[^/]+(?:\\/.*)?" |
48 | 42 | }, |
49 | 43 | "type": { |
| 44 | + "title": "Letter CANCELLED event type", |
| 45 | + "description": "Event type using reverse-DNS style", |
| 46 | + "examples": [ |
| 47 | + "uk.nhs.notify.supplier-api.letter.CANCELLED.v1" |
| 48 | + ], |
50 | 49 | "type": "string", |
51 | 50 | "enum": [ |
52 | 51 | "uk.nhs.notify.supplier-api.letter.CANCELLED.v1" |
|
74 | 73 | ] |
75 | 74 | }, |
76 | 75 | "dataschema": { |
| 76 | + "title": "Data Schema URI", |
| 77 | + "description": "URI of a schema that describes the event data\n\nData schema version must match the major version indicated by the type", |
| 78 | + "examples": [ |
| 79 | + "https://notify.nhs.uk/cloudevents/schemas/supplier-api/letter.ACCEPTED.1.0.0.schema.json" |
| 80 | + ], |
77 | 81 | "type": "string", |
78 | | - "pattern": "^https:\\/\\/notify\\.nhs\\.uk\\/events\\/supplier-api\\/letter\\/CANCELLED\\/1\\.\\d+\\.\\d+\\.json$" |
| 82 | + "pattern": "^https:\\/\\/notify\\.nhs\\.uk\\/cloudevents\\/schemas\\/supplier-api\\/letter.CANCELLED.1\\.\\d+\\.\\d+\\.schema.json$" |
79 | 83 | }, |
80 | 84 | "data": { |
| 85 | + "title": "Letter", |
| 86 | + "description": "The status of a letter in the supplier-api domain.\n\nThis will include the current production status, any reason provided for the status, if applicable, and identifiers used for grouping in reports.\n\nFor this event the status is always `CANCELLED`", |
81 | 87 | "type": "object", |
82 | 88 | "properties": { |
83 | 89 | "domainId": { |
|
90 | 96 | }, |
91 | 97 | "origin": { |
92 | 98 | "title": "Letter origin", |
93 | | - "description": "The origin domain identifier, source and subject of the original event that introduced the letter to the supplier-api domain.\n\nThe identifier will be included as the origin in the subject of any corresponding events emitted by the supplier-api domain.", |
| 99 | + "description": "Identifiers captured from the original event that introduced the letter to the supplier-api domain.\n\nThe identifier will be included as the origin domain in the subject of any corresponding events emitted by the supplier-api domain.", |
94 | 100 | "examples": [ |
95 | 101 | { |
96 | 102 | "domain": "letter-rendering", |
97 | | - "source": "/data-plane/letter-rendering/prod/render-pdf", |
98 | | - "subject": "customer/00f3b388-bbe9-41c9-9e76-052d37ee8988/letter-rendering/letter-request/0o5Fs0EELR0fUjHjbCnEtdUwQe4_0o5Fs0EELR0fUjHjbCnEtdUwQe5" |
| 103 | + "subject": "customer/00f3b388-bbe9-41c9-9e76-052d37ee8988/letter-rendering/letter-request/0o5Fs0EELR0fUjHjbCnEtdUwQe4_0o5Fs0EELR0fUjHjbCnEtdUwQe5", |
| 104 | + "event": "00f3b388-bbe9-41c9-9e76-052d37ee8988" |
99 | 105 | } |
100 | 106 | ], |
101 | 107 | "type": "object", |
102 | 108 | "properties": { |
103 | 109 | "domain": { |
| 110 | + "title": "Domain ID", |
| 111 | + "description": "The domain which requested this letter", |
104 | 112 | "type": "string" |
105 | 113 | }, |
106 | | - "source": { |
| 114 | + "subject": { |
| 115 | + "title": "Event subject", |
| 116 | + "description": "The subject of the event which created this letter", |
107 | 117 | "type": "string" |
108 | 118 | }, |
109 | | - "subject": { |
| 119 | + "event": { |
| 120 | + "title": "Event ID", |
| 121 | + "description": "The ID of the event which created this letter", |
110 | 122 | "type": "string" |
111 | 123 | } |
112 | 124 | }, |
113 | 125 | "required": [ |
114 | 126 | "domain", |
115 | | - "source", |
116 | | - "subject" |
| 127 | + "subject", |
| 128 | + "event" |
117 | 129 | ] |
118 | 130 | }, |
119 | 131 | "specificationId": { |
|
295 | 307 | ] |
296 | 308 | }, |
297 | 309 | "dataschemaversion": { |
| 310 | + "title": "Data Schema Version", |
| 311 | + "description": "Matches semantic versioning format with fixed major version (Not part of cloudevents spec?)", |
298 | 312 | "type": "string", |
299 | 313 | "pattern": "^1\\.\\d+\\.\\d+$" |
300 | 314 | } |
|
0 commit comments