Skip to content

Commit c4f7886

Browse files
Ewan-DonovanEwan Donovan
and
Ewan Donovan
authored
Swagger Updates (Gender) (#71)
* 1-male, 2-female * Further revisions --------- Co-authored-by: Ewan Donovan <ewan.donovan@digital.justice.com>
1 parent 7b034bb commit c4f7886

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Example response body:
8484
"dateOfAddressCapture": "2009-04-25",
8585
"dateOfBirth": "1976-08-16",
8686
"placeOfBirth": "Blean ",
87-
"gender": "2",
87+
"gender": "FEMALE",
8888
"emailAddress": "darcie.tucker@aol.compatibilitytest.com",
8989
"scottishCandidateNumber": "845759406",
9090
"abilityToShare": "1",

src/main/kotlin/uk/gov/justice/digital/hmpps/learnerrecordsapi/openapi/LearnerEventsApi.kt

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import uk.gov.justice.hmpps.kotlin.common.ErrorResponse
3434
"familyName": "Findlay",
3535
"uln": "1174112637",
3636
"dateOfBirth": "1980-11-01",
37-
"gender": 1
37+
"gender": "MALE"
3838
}
3939
""",
4040
),
@@ -46,7 +46,7 @@ import uk.gov.justice.hmpps.kotlin.common.ErrorResponse
4646
"familyName": "Test",
4747
"uln": "1174112637",
4848
"dateOfBirth": "1995-05-12",
49-
"gender": 2
49+
"gender": "FEMALE"
5050
}
5151
""",
5252
),
@@ -58,7 +58,7 @@ import uk.gov.justice.hmpps.kotlin.common.ErrorResponse
5858
"familyName": "Brennan-Ace",
5959
"uln": "1026922983",
6060
"dateOfBirth": "1992-03-27",
61-
"gender": 3
61+
"gender": "FEMALE"
6262
}
6363
""",
6464
),
@@ -70,7 +70,7 @@ import uk.gov.justice.hmpps.kotlin.common.ErrorResponse
7070
"familyName": "Carrol",
7171
"uln": "4444599390",
7272
"dateOfBirth": "2000-07-19",
73-
"gender": 1
73+
"gender": "MALE"
7474
}
7575
""",
7676
),
@@ -97,7 +97,7 @@ import uk.gov.justice.hmpps.kotlin.common.ErrorResponse
9797
"familyName": "Findlay",
9898
"uln": "1174112637",
9999
"dateOfBirth": "1980-11-01",
100-
"gender": 1
100+
"gender": "MALE"
101101
},
102102
"responseType": "Exact Match",
103103
"foundUln": "1174112637",

src/main/kotlin/uk/gov/justice/digital/hmpps/learnerrecordsapi/openapi/LearnersApi.kt

+13-13
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ fun readResourceFile(fileName: String): String {
4242
"givenName": "Darcie",
4343
"familyName": "Tucker",
4444
"dateOfBirth": "1976-08-16",
45-
"gender": "2",
45+
"gender": "FEMALE",
4646
"lastKnownPostCode": "CV49EE"
4747
}
4848
""",
@@ -54,7 +54,7 @@ fun readResourceFile(fileName: String): String {
5454
"givenName": "Anna",
5555
"familyName": "Cheng",
5656
"dateOfBirth": "1995-06-28",
57-
"gender": "2",
57+
"gender": "FEMALE",
5858
"lastKnownPostCode": "ZZ12ZZ"
5959
}
6060
""",
@@ -66,7 +66,7 @@ fun readResourceFile(fileName: String): String {
6666
"givenName": "Connor",
6767
"familyName": "Carroll",
6868
"dateOfBirth": "1985-03-27",
69-
"gender": "1",
69+
"gender": "MALE",
7070
"lastKnownPostCode": "AB125EQ"
7171
}
7272
""",
@@ -78,7 +78,7 @@ fun readResourceFile(fileName: String): String {
7878
"givenName": "Random",
7979
"familyName": "Name",
8080
"dateOfBirth": "2000-01-01",
81-
"gender": "2",
81+
"gender": "FEMALE",
8282
"lastKnownPostCode": "CV49EE"
8383
}
8484
""",
@@ -105,7 +105,7 @@ fun readResourceFile(fileName: String): String {
105105
"givenName": "Darcie",
106106
"familyName": "Tucker",
107107
"dateOfBirth": "1976-08-16",
108-
"gender": 2,
108+
"gender": "FEMALE",
109109
"lastKnownPostcode": "CV49EE"
110110
},
111111
"responseType": "Exact Match",
@@ -130,7 +130,7 @@ fun readResourceFile(fileName: String): String {
130130
"dateOfAddressCapture": "2009-04-25",
131131
"dateOfBirth": "1976-08-16",
132132
"placeOfBirth": "Blean ",
133-
"gender": "2",
133+
"gender": "FEMALE",
134134
"emailAddress": "darcie.tucker@aol.compatibilitytest.com",
135135
"scottishCandidateNumber": "845759406",
136136
"abilityToShare": "1",
@@ -150,7 +150,7 @@ fun readResourceFile(fileName: String): String {
150150
"givenName": "Anna",
151151
"familyName": "Cheng",
152152
"dateOfBirth": "1995-06-28",
153-
"gender": 2,
153+
"gender": "FEMALE",
154154
"lastKnownPostcode": "ZZ12ZZ"
155155
},
156156
"responseType": "Possible Match",
@@ -180,7 +180,7 @@ fun readResourceFile(fileName: String): String {
180180
"dateOfAddressCapture": "2010-09-07",
181181
"dateOfBirth": "1995-06-28",
182182
"placeOfBirth": "Chard ",
183-
"gender": "2",
183+
"gender": "FEMALE",
184184
"emailAddress": "anna.cheng@yahoo.compatibilitytest.co.uk",
185185
"scottishCandidateNumber": "820208781",
186186
"abilityToShare": "1",
@@ -208,7 +208,7 @@ fun readResourceFile(fileName: String): String {
208208
"dateOfAddressCapture": "2010-09-07",
209209
"dateOfBirth": "1995-06-28",
210210
"placeOfBirth": "Chard ",
211-
"gender": "2",
211+
"gender": "FEMALE",
212212
"emailAddress": "anna.cheng@yahoo.compatibilitytest.co.uk",
213213
"scottishCandidateNumber": "820208781",
214214
"abilityToShare": "1",
@@ -228,7 +228,7 @@ fun readResourceFile(fileName: String): String {
228228
"givenName": "Connor",
229229
"familyName": "Carroll",
230230
"dateOfBirth": "1985-03-27",
231-
"gender": 1,
231+
"gender": "MALE",
232232
"lastKnownPostcode": "AB125EQ"
233233
},
234234
"responseType": "Linked Learner Found",
@@ -253,7 +253,7 @@ fun readResourceFile(fileName: String): String {
253253
"dateOfAddressCapture": "2008-07-13",
254254
"dateOfBirth": "1985-03-27",
255255
"placeOfBirth": "Whittlesey ",
256-
"gender": "1",
256+
"gender": "MALE",
257257
"emailAddress": "william-connor.carroll@inbox.compatibilitytest.com",
258258
"scottishCandidateNumber": "145589606",
259259
"abilityToShare": "1",
@@ -273,7 +273,7 @@ fun readResourceFile(fileName: String): String {
273273
"givenName": "Someone",
274274
"familyName": "Unknown",
275275
"dateOfBirth": "1976-08-16",
276-
"gender": 2,
276+
"gender": "FEMALE",
277277
"lastKnownPostcode": "CV49EE"
278278
},
279279
"responseType": "No Match"
@@ -288,7 +288,7 @@ fun readResourceFile(fileName: String): String {
288288
"givenName": "Someone",
289289
"familyName": "Common",
290290
"dateOfBirth": "1976-08-16",
291-
"gender": 2,
291+
"gender": "FEMALE",
292292
"lastKnownPostcode": "CV49EE"
293293
},
294294
"responseType": "Too Many Matches"

src/test/kotlin/uk/gov/justice/digital/hmpps/learnerrecordsapi/config/ValidationTest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ class ValidationTest : IntegrationTestBase() {
402402
{
403403
"lastName": "Tucker",
404404
"dateOfBirth": "2024-01-01",
405-
"gender": 1,
405+
"gender": "FEMALE",
406406
"postcode": "CV49EE"
407407
}
408408
"""

0 commit comments

Comments
 (0)