Skip to content

Commit 4474f70

Browse files
authored
CCM-15256: invalid attachment received diagram (#280)
* Add InvalidAttachmentReceived to PrintAnalyser diagram * Added schema for InvalidAttachmentReceived event
1 parent b69ddd2 commit 4474f70

11 files changed

Lines changed: 146 additions & 80 deletions

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ jq 1.6
44
nodejs 24.10.0
55
pre-commit 3.6.0
66
python 3.14.0
7+
ruby 3.2.0
78
terraform 1.10.1
89
terraform-docs 0.19.0
910
vale 3.6.0

README.md

Lines changed: 26 additions & 24 deletions
Large diffs are not rendered by default.

docs/collections/_diagrams/c4code-printer-analyser.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,17 @@ architecture-beta
1111
service analyseLambda(logos:aws-lambda)[PrintAnalyser] in printAnalyser
1212
service safeBucket(logos:aws-s3)[SafeFiles] in printAnalyser
1313
service pdfAnalysed(aws:res-amazon-eventbridge-event)[PDFAnalysed Event]
14+
service invalidAttachment(aws:res-amazon-eventbridge-event)[InvalidAttachmentReceived Event]
1415
group printAnalyser(cloud)[PrintAnalyser]
1516
17+
junction j1
18+
1619
fileSafe:R --> L:analyseQueue
1720
analyseQueue:R --> L:analyseLambda
1821
safeBucket:B --> T:analyseLambda
19-
analyseLambda:R --> L:pdfAnalysed
22+
analyseLambda:R -- L:j1
23+
j1:T --> B:pdfAnalysed
24+
j1:B --> T:invalidAttachment
2025
2126
2227
```
File renamed without changes.
File renamed without changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: invalid-attachment-received
3+
type: uk.nhs.notify.digital.letters.print.invalid.attachment.received.v1
4+
nice_name: InvalidAttachmentReceived
5+
service: Print Supplier Services
6+
schema_envelope: https://notify.nhs.uk/cloudevents/schemas/digital-letters/2025-10-draft/events/uk.nhs.notify.digital.letters.print.invalid.attachment.received.v1.schema.json
7+
schema_data: https://notify.nhs.uk/cloudevents/schemas/digital-letters/2025-10-draft/data/digital-letters-print-invalid-attachment-received-data.schema.json
8+
---
9+
10+
This event is published when a digital letter attachment is not in the expected (PDF) format. It indicates that the attachment cannot be processed for printing and requires attention to resolve the issue.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
$schema: https://json-schema.org/draft/2020-12/schema
2+
title: InvalidAttachmentReceived Data
3+
description: Data payload of the InvalidAttachmentReceived event
4+
type: object
5+
additionalProperties: false
6+
properties:
7+
messageReference:
8+
$ref: ../defs/requests.schema.yaml#/properties/messageReference
9+
senderId:
10+
$ref: ../defs/requests.schema.yaml#/properties/senderId
11+
failureCode:
12+
$ref: ../defs/requests.schema.yaml#/properties/failureCode
13+
required:
14+
- messageReference
15+
- senderId
16+
- failureCode

src/cloudevents/domains/digital-letters/2025-10-draft/defs/print.schema.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ properties:
6262
type: string
6363
description: A codified reason for the status of the message
6464
examples:
65-
- "FAILURE001"
65+
- "DL_CLIV_002"
6666
reasonText:
6767
type: string
6868
description: Human-readable explanation for the reasonCode

src/cloudevents/domains/digital-letters/2025-10-draft/defs/requests.schema.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ properties:
3636
type: string
3737
description: The failure code indicating the reason for the message being invalid
3838
examples:
39-
- "LOCALID_HEADER_MISSING"
39+
- "DL_CLIV_001"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
$schema: https://json-schema.org/draft/2020-12/schema
2+
title: InvalidAttachmentReceived
3+
type: object
4+
allOf:
5+
- $ref: ../digital-letters-print-profile.schema.yaml
6+
properties:
7+
type:
8+
type: string
9+
const: uk.nhs.notify.digital.letters.print.invalid.attachment.received.v1
10+
description: Concrete versioned event type string for this event (.vN suffix).
11+
source:
12+
type: string
13+
pattern: ^/nhs/england/notify/(production|staging|development|uat)/(primary|secondary|dev-[0-9]+)/data-plane/digitalletters/print
14+
description: Event source for digital letters.
15+
dataschema:
16+
type: string
17+
const: ../data/digital-letters-print-invalid-attachment-received-data.schema.yaml
18+
description: Canonical URI of the event's data schema.
19+
examples:
20+
- digital-letters-print-invalid-attachment-received-data.schema.yaml
21+
data:
22+
$ref: ../data/digital-letters-print-invalid-attachment-received-data.schema.yaml

0 commit comments

Comments
 (0)