From 724e9f21fdb3f64beeb00142ae5484024bcb9be1 Mon Sep 17 00:00:00 2001 From: lalithanagarur Date: Mon, 10 Mar 2025 17:55:02 +0000 Subject: [PATCH] few corrections in readme and MatchType --- README.md | 45 ++----------------- .../models/request/MatchType.kt | 2 +- 2 files changed, 5 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index 4313712..0d880ab 100644 --- a/README.md +++ b/README.md @@ -265,8 +265,8 @@ The match will be saved as a `MatchEntity` in the database. "matchingUln": "1234567890", "givenName": "John", "familyName": "Smith", - "matchType": "POSSIBLE_MATCH", - "countOfReturnedULNs": "2" + "matchType": "Possible match", + "countOfReturnedUlns": "2" } @@ -287,8 +287,8 @@ The match will be saved as a `MatchEntity` in the database.
 {
-  "matchType": "NO_MATCH_RETURNED_FROM_LRS",
-  "countOfReturnedULNs": "0"
+  "matchType": "No match returned from LRS",
+  "countOfReturnedUlns": "0"
 }
 
@@ -300,43 +300,6 @@ Response codes: * 403 - Forbidden * 500 - Likely that the database is unreachable -### `POST:/match/:nomisId` -This endpoint is to confirm a match between a learner's NOMIS ID and ULN. -The givenName and familyName should be as per the LRS data for a match. -The match will be saved as a `MatchEntity` in the database. - -
-Example request body for a match: -
-
-{
-  "matchingUln": "1234567890",
-  "givenName": "John",
-  "familyName": "Smith",
-  "matchType": "POSSIBLE_MATCH",
-  "countOfReturnedULNs": "2"
-}
-
-
- -
-Example request body for a no match: -
-
-{
-  "matchType": "NO_MATCH_SELECTED",
-  "countOfReturnedULNs": "6"
-}
-
-
- -Response codes: -* 201 - Created -* 400 - Bad Request, malformed ULN or json body -* 401 - Unauthorised -* 403 - Forbidden -* 500 - Likely that the database is unreachable - ### `GET:/match/:nomisId` This endpoint is to search the database for a match given a NOMIS ID. diff --git a/src/main/kotlin/uk/gov/justice/digital/hmpps/learnerrecordsapi/models/request/MatchType.kt b/src/main/kotlin/uk/gov/justice/digital/hmpps/learnerrecordsapi/models/request/MatchType.kt index d79d3a7..0c975ff 100644 --- a/src/main/kotlin/uk/gov/justice/digital/hmpps/learnerrecordsapi/models/request/MatchType.kt +++ b/src/main/kotlin/uk/gov/justice/digital/hmpps/learnerrecordsapi/models/request/MatchType.kt @@ -7,7 +7,7 @@ enum class MatchType(val description: String) { NO_MATCH_RETURNED_FROM_LRS("No match returned from LRS"), EXACT_MATCH("Exact match"), POSSIBLE_MATCH("Possible match"), - LINKED_LEARNER_MATCH("linked learner match"), + LINKED_LEARNER_MATCH("Linked learner match"), TOO_MANY_RESULTS("Too many results"), ;