From ce89267687deb39cf2148bd9436ca691ff7fd008 Mon Sep 17 00:00:00 2001 From: Matthew Ryall Date: Wed, 27 Sep 2023 11:40:51 +0100 Subject: [PATCH] PI-1480: Add Context Map for Manage Offences and Delius (#2314) --- projects/manage-offences-and-delius/README.md | 4 + .../diag/manage-offences-context-map.d2 | 39 +++++ .../source/async-api-reference.html.md.erb | 2 +- ...manage-offences-and-delius-context-map.svg | 160 ++++++++++++++++++ .../tech-docs/spec/async-api.yaml | 2 +- 5 files changed, 205 insertions(+), 2 deletions(-) create mode 100644 projects/manage-offences-and-delius/tech-docs/diag/manage-offences-context-map.d2 create mode 100644 projects/manage-offences-and-delius/tech-docs/source/img/manage-offences-and-delius-context-map.svg diff --git a/projects/manage-offences-and-delius/README.md b/projects/manage-offences-and-delius/README.md index e5088eb53e..83a524c8ce 100644 --- a/projects/manage-offences-and-delius/README.md +++ b/projects/manage-offences-and-delius/README.md @@ -4,6 +4,10 @@ Inbound service that responds to events raised by the HMPPS Manage Offences service when there are changes to the set of [CJS Offence Codes](https://www.criminaljusticehub.org.uk/jargon-buster/cjs-offence-code/) managed by that service. Any changes to the set of offence codes is reflected in the Delius database. This ensures that Delius is up-to-date with the common set of offence codes used across HMPPS Digital services. +## Context Map + +![Context Map](tech-docs/source/img/manage-offences-and-delius-context-map.svg) + ## Interfaces ### Message Formats diff --git a/projects/manage-offences-and-delius/tech-docs/diag/manage-offences-context-map.d2 b/projects/manage-offences-and-delius/tech-docs/diag/manage-offences-context-map.d2 new file mode 100644 index 0000000000..9d6901d496 --- /dev/null +++ b/projects/manage-offences-and-delius/tech-docs/diag/manage-offences-context-map.d2 @@ -0,0 +1,39 @@ + +style { + fill: "#ffffff" +} + +context-manage-offences: Manage Offences Context { + link: https://github.com/ministryofjustice/hmpps-manage-offences-api + + entities: Entities { + grid-columns: 1 + cjs-offence-code: CJS Offence Code + ho-offence-code: Home Office Offence Code + } + + interface: Manage Offences API { + type: Open Host Service + } +} + +context-delius: Delius Context { + link: https://github.com/ministryofjustice/delius + style.stroke-width: 8 + + entities: Entities { + grid-columns: 1 + cjs-offence: Detailed Offence (CJS) + ho-offence: Offence (HO) + } + interface: Manage Offences and Delius { + link: https://ministryofjustice.github.io/hmpps-probation-integration-services/tech-docs/projects/manage-offences-and-delius/ + type: Anti-Corruption Layer + } +} + +context-manage-offences.interface--context-delius.interface: Upstream\n\n\nDownstream + +*.style.border-radius: 10 +*.*.style.border-radius: 10 +*.*.style.stroke-width: 2 diff --git a/projects/manage-offences-and-delius/tech-docs/source/async-api-reference.html.md.erb b/projects/manage-offences-and-delius/tech-docs/source/async-api-reference.html.md.erb index d124207aaf..1a21c8e4b7 100644 --- a/projects/manage-offences-and-delius/tech-docs/source/async-api-reference.html.md.erb +++ b/projects/manage-offences-and-delius/tech-docs/source/async-api-reference.html.md.erb @@ -6,4 +6,4 @@ weight: 30 # ASyncAPI Reference -* [ASyncAPI Spec](https://studio.asyncapi.com/?url=https://raw.githubusercontent.com/ministryofjustice/hmpps-probation-integration-services/main/projects/manage-offences-and-delius/tech-docs/spec/async-api.yaml&readOnly) + diff --git a/projects/manage-offences-and-delius/tech-docs/source/img/manage-offences-and-delius-context-map.svg b/projects/manage-offences-and-delius/tech-docs/source/img/manage-offences-and-delius-context-map.svg new file mode 100644 index 0000000000..a6d6858301 --- /dev/null +++ b/projects/manage-offences-and-delius/tech-docs/source/img/manage-offences-and-delius-context-map.svg @@ -0,0 +1,160 @@ +Manage Offences ContextDelius ContextEntitiesManage Offences APIEntitiesManage Offences and DeliusCJS Offence CodeHome Office Offence CodeOpen Host ServiceDetailed Offence (CJS)Offence (HO)Anti-Corruption LayerUpstream Downstream + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projects/manage-offences-and-delius/tech-docs/spec/async-api.yaml b/projects/manage-offences-and-delius/tech-docs/spec/async-api.yaml index 1442eda755..9b779937d9 100644 --- a/projects/manage-offences-and-delius/tech-docs/spec/async-api.yaml +++ b/projects/manage-offences-and-delius/tech-docs/spec/async-api.yaml @@ -18,6 +18,6 @@ servers: channels: hmpps-domain-events/manage-offences-and-delius/offence-changed: subscribe: - operationId: + operationId: manage-offences.offence.changed message: $ref: https://raw.githubusercontent.com/ministryofjustice/hmpps-domain-events/main/spec/schemas/manage-offences/offence-changed.yml