Skip to content

Commit b0e262f

Browse files
committed
CCM-8855: Add types for hashes and signatures, plus non-prerendered letters.
1 parent af2eee0 commit b0e262f

File tree

1 file changed

+90
-22
lines changed

1 file changed

+90
-22
lines changed

specification/api/notify-supplier.yml

Lines changed: 90 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ info:
33
version: 0.0.1
44
title: NHS Notify Supplier API
55
description: API for communication suppliers to integrate with NHS Notify
6-
x-fiddle-import-file: true
76
security:
87
- authorization: []
98
paths:
@@ -90,7 +89,7 @@ paths:
9089
content:
9190
application/vnd.api+json:
9291
schema:
93-
$ref: '#/components/schemas/BatchResponse'
92+
$ref: '#/components/schemas/LetterBatchResponse'
9493
examples:
9594
example-1:
9695
value:
@@ -440,6 +439,12 @@ components:
440439
schemas:
441440
Download:
442441
type: object
442+
required:
443+
- expiry
444+
- url
445+
- sha256
446+
- signature
447+
- key
443448
properties:
444449
expiry:
445450
type: string
@@ -451,11 +456,39 @@ components:
451456
format: uri
452457
examples:
453458
- 'http://s3-presigned-url'
459+
sha256:
460+
$ref: '#/components/schemas/Sha256'
461+
signature:
462+
$ref: '#/components/schemas/EcdsaSignature'
463+
key:
464+
$ref: '#/components/schemas/EcdsaKey'
465+
PersonalisedLetter:
466+
type: object
467+
x-stoplight:
468+
id: b692619fe3678
454469
required:
455-
- expiry
456-
- url
457-
Letter:
470+
- messageId
471+
properties:
472+
messageId:
473+
type: string
474+
examples:
475+
- 2WL5f8j4XVxUPgd3OOqXVYvVFIW
476+
personalisation:
477+
type: object
478+
x-stoplight:
479+
id: dft0vhjzeqbm4
480+
additionalProperties:
481+
x-stoplight:
482+
id: 66q6lm6h9vj4v
483+
type: string
484+
PrerenderedLetter:
458485
type: object
486+
x-stoplight:
487+
id: 7gylnxnf8h4w3
488+
required:
489+
- messageId
490+
- fileName
491+
- sha256
459492
properties:
460493
messageId:
461494
type: string
@@ -465,7 +498,8 @@ components:
465498
type: string
466499
examples:
467500
- 2WL5f8j4XVxUPgd3OOqXVYvVFIW.pdf
468-
required: []
501+
sha256:
502+
$ref: '#/components/schemas/Sha256'
469503
ErrorResponse:
470504
type: object
471505
properties:
@@ -511,9 +545,7 @@ components:
511545
type: object
512546
properties:
513547
type:
514-
const: Letter
515-
enum:
516-
- Batch
548+
const: Batch
517549
id:
518550
type: string
519551
examples:
@@ -614,6 +646,8 @@ components:
614646
- PENDING
615647
- ACCEPTED
616648
- REJECTED
649+
- PRINTED
650+
- ENCLOSED
617651
- CANCELLED
618652
- DISPATCHED
619653
- FAILED
@@ -638,11 +672,19 @@ components:
638672
examples:
639673
- ACTIVE
640674
title: ProductionStatus
641-
BatchResponse:
675+
LetterBatchResponse:
642676
type: object
677+
x-stoplight:
678+
id: e6650543dba07
679+
required:
680+
- data
643681
properties:
644682
data:
645683
type: object
684+
required:
685+
- type
686+
- id
687+
- attributes
646688
properties:
647689
type:
648690
const: Letters
@@ -652,23 +694,49 @@ components:
652694
- 2WL5eYSWGzCHlGmzNxuqVusPxDg
653695
attributes:
654696
type: object
697+
required:
698+
- prerendered
655699
properties:
700+
prerendered:
701+
type: boolean
702+
x-stoplight:
703+
id: qimmzekah31du
656704
download:
657705
$ref: '#/components/schemas/Download'
658-
letters:
706+
personalisedLetters:
659707
type: array
660708
items:
661-
$ref: '#/components/schemas/Letter'
662-
required:
663-
- download
664-
- letters
665-
required:
666-
- attributes
667-
- type
668-
- id
669-
required:
670-
- data
671-
description: ''
709+
$ref: '#/components/schemas/PersonalisedLetter'
710+
x-stoplight:
711+
id: 1s1ff8b7cjr9q
712+
prerenderedLetters:
713+
type: array
714+
items:
715+
$ref: '#/components/schemas/PrerenderedLetter'
716+
x-stoplight:
717+
id: dp6rixhwmmnby
718+
Sha256:
719+
title: Sha256
720+
x-stoplight:
721+
id: ul241al5tpyrm
722+
type: string
723+
examples:
724+
- 9bf1619f5c5d60f18c14578994b6310ee3339f435b6b6424fde1bb7d91b5ab71
725+
description: SHA 256 Hash of a file or other resource used to verify the expected content
726+
EcdsaKey:
727+
title: EcdsaKey
728+
type: string
729+
examples:
730+
- c374556584db050001c2c9265b546e66d3dbbe8239d17427c176d834a19638dc
731+
description: Public ECDSA Key corresponding to a signature used to verify the originator of a file. This public key should correspond to one published by NHS Notify.
732+
EcdsaSignature:
733+
title: EcdsaSignature
734+
x-stoplight:
735+
id: y4t72k7ltybkm
736+
type: string
737+
examples:
738+
- d034c98af3274ad93f3c8ce944bbc17b11b6aa170c5f097ed98687fa0d93347c
739+
description: ECDSA Signature of a file or other resource used to verify the originator
672740
responses:
673741
BadRequest:
674742
description: 'Bad request, invalid input data'

0 commit comments

Comments
 (0)