You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"status" to Schema<Int>().type("number").example(400),
58
+
"userMessage" to Schema<String>().type("string").example("Validation failure: No query parameters specified."),
59
+
"developerMessage" to Schema<String>().type("string").example("No query parameters specified."),
60
+
),
61
+
),
61
62
)
62
63
.addSchemas(
63
64
"PersonNotFound",
64
-
Schema<ErrorResponse>()
65
-
.description("Failed to find a person with the provided HMPPS ID.")
66
-
.example(ErrorResponse(404, userMessage ="404 Not found error: Could not find person with HMPPS id: 2003/0011991D.", developerMessage ="Could not find person with HMPPS id: 2003/0011991D.")),
65
+
Schema<ErrorResponse>().description("Failed to find a person with the provided HMPPS ID.").properties(
66
+
mapOf(
67
+
"status" to Schema<Int>().type("number").example(404),
68
+
"userMessage" to Schema<String>().type("string").example("404 Not found error: Could not find person with HMPPS id: 2003/0011991D."),
69
+
"developerMessage" to Schema<String>().type("string").example("Could not find person with HMPPS id: 2003/0011991D."),
70
+
),
71
+
),
67
72
)
68
73
.addSchemas(
69
74
"InternalServerError",
70
-
Schema<ErrorResponse>()
71
-
.description("An upstream service was not responding, so we cannot verify the accuracy of any data we did get.")
72
-
.example(ErrorResponse(500, userMessage ="Internal Server Error", developerMessage ="Unable to complete request as an upstream service is not responding.")),
75
+
Schema<ErrorResponse>().description("An upstream service was not responding, so we cannot verify the accuracy of any data we did get.").properties(
76
+
mapOf(
77
+
"status" to Schema<Int>().type("number").example(500),
78
+
"userMessage" to Schema<String>().type("string").example("Internal Server Error"),
79
+
"developerMessage" to Schema<String>().type("string").example("Unable to complete request as an upstream service is not responding."),
Copy file name to clipboardexpand all lines: src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/EPFPersonDetailController.kt
+1-1
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ class EPFPersonDetailController(
34
34
reduce the need for the EPF user to re-key information already held in Delius.</p>
Copy file name to clipboardexpand all lines: src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/ImageController.kt
+1-1
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ class ImageController(
27
27
@Operation(
28
28
summary ="Returns an image in bytes as a JPEG.",
29
29
responses = [
30
-
ApiResponse(responseCode ="200", description ="Successfully found an image with the provided ID."),
30
+
ApiResponse(responseCode ="200", useReturnTypeSchema =true, description ="Successfully found an image with the provided ID."),
31
31
ApiResponse(responseCode ="404", description ="Failed to find an image with the provided ID.", content = [Content(schema =Schema(ref ="#/components/schemas/PersonNotFound"))]),
Copy file name to clipboardexpand all lines: src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/RiskManagementController.kt
+1-1
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ class RiskManagementController(
34
34
@Operation(
35
35
summary ="Returns a list of Risk Management Plans created for the person with the provided HMPPS ID.",
36
36
responses = [
37
-
ApiResponse(responseCode ="200", description ="Successfully found risk management plans for a person with the provided HMPPS ID."),
37
+
ApiResponse(responseCode ="200", useReturnTypeSchema =true, description ="Successfully found risk management plans for a person with the provided HMPPS ID."),
Copy file name to clipboardexpand all lines: src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/person/AddressController.kt
+1-1
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ class AddressController(
31
31
@Operation(
32
32
summary ="Returns addresses associated with a person, ordered by startDate.",
33
33
responses = [
34
-
ApiResponse(responseCode ="200", description ="Successfully found a person with the provided HMPPS ID."),
34
+
ApiResponse(responseCode ="200", useReturnTypeSchema =true, description ="Successfully found a person with the provided HMPPS ID."),
Copy file name to clipboardexpand all lines: src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/person/AdjudicationsController.kt
+1-1
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ class AdjudicationsController(
32
32
@Operation(
33
33
summary ="Returns adjudications associated with a person, sorted by dateTimeOfIncident (newest first).",
ApiResponse(responseCode ="404", description ="Failed to find adjudications for the person with the provided hmppsId.", content = [Content(schema =Schema(ref ="#/components/schemas/PersonNotFound"))]),
Copy file name to clipboardexpand all lines: src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/person/AlertsController.kt
+2-2
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ class AlertsController(
33
33
@Operation(
34
34
summary ="Returns alerts associated with a person, sorted by dateCreated (newest first).",
35
35
responses = [
36
-
ApiResponse(responseCode ="200", description ="Successfully found alerts for a person with the provided HMPPS ID."),
36
+
ApiResponse(responseCode ="200", useReturnTypeSchema =true, description ="Successfully found alerts for a person with the provided HMPPS ID."),
Copy file name to clipboardexpand all lines: src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/person/CaseNotesController.kt
+1-1
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ class CaseNotesController(
36
36
@Operation(
37
37
summary ="Returns case notes associated with a person.",
38
38
responses = [
39
-
ApiResponse(responseCode ="200", description ="Successfully found case notes for a person with the provided HMPPS ID."),
39
+
ApiResponse(responseCode ="200", useReturnTypeSchema =true, description ="Successfully found case notes for a person with the provided HMPPS ID."),
Copy file name to clipboardexpand all lines: src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/person/DynamicRisksController.kt
+1-1
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ class DynamicRisksController(
33
33
@Operation(
34
34
summary ="Returns dynamic risks associated with a person.",
35
35
responses = [
36
-
ApiResponse(responseCode ="200", description ="Successfully found dynamic risks for a person with the provided HMPPS ID."),
36
+
ApiResponse(responseCode ="200", useReturnTypeSchema =true, description ="Successfully found dynamic risks for a person with the provided HMPPS ID."),
Copy file name to clipboardexpand all lines: src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/person/LicenceConditionController.kt
+1-1
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ class LicenceConditionController(
30
30
@Operation(
31
31
summary ="Returns license conditions associated with a person, sorted by createdDateTime (newest first).",
32
32
responses = [
33
-
ApiResponse(responseCode ="200", description ="Successfully found licenses for a person with the provided HMPPS ID."),
33
+
ApiResponse(responseCode ="200", useReturnTypeSchema =true, description ="Successfully found licenses for a person with the provided HMPPS ID."),
Copy file name to clipboardexpand all lines: src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/person/MappaDetailController.kt
+1-1
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ class MappaDetailController(
30
30
@Operation(
31
31
summary ="Returns the mappa detail related to a person.",
32
32
responses = [
33
-
ApiResponse(responseCode ="200", description ="Successfully found mappa detail for a person with the provided HMPPS ID."),
33
+
ApiResponse(responseCode ="200", useReturnTypeSchema =true, description ="Successfully found mappa detail for a person with the provided HMPPS ID."),
Copy file name to clipboardexpand all lines: src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/person/NeedsController.kt
+1-1
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ class NeedsController(
35
35
However, the process by which needs are assessed is changing as early as next year (2024), specifically moving to a strength-based model that seeks to identify and develop the strengths of people with convictions. As a consequence of this, the information provided by this endpoint will also change.
36
36
""",
37
37
responses = [
38
-
ApiResponse(responseCode ="200", description ="Successfully found criminogenic needs for a person with the provided HMPPS ID."),
38
+
ApiResponse(responseCode ="200", useReturnTypeSchema =true, description ="Successfully found criminogenic needs for a person with the provided HMPPS ID."),
Copy file name to clipboardexpand all lines: src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/person/OffencesController.kt
+1
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,7 @@ class OffencesController(
43
43
description ="Successfully found offences for a person with the provided HMPPS ID.",
Copy file name to clipboardexpand all lines: src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/person/PersonController.kt
+4-4
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ class PersonController(
46
46
@Operation(
47
47
summary ="Returns person(s) by search criteria, sorted by date of birth (newest first). At least one query parameter must be specified.",
48
48
responses = [
49
-
ApiResponse(responseCode ="200", description ="Successfully performed the query on upstream APIs. An empty list is returned when no results are found."),
49
+
ApiResponse(responseCode ="200", useReturnTypeSchema =true, description ="Successfully performed the query on upstream APIs. An empty list is returned when no results are found."),
50
50
ApiResponse(
51
51
responseCode ="400",
52
52
description ="There were no query parameters passed in. At least one must be specified.",
@@ -85,7 +85,7 @@ class PersonController(
85
85
@Operation(
86
86
summary ="Returns a person.",
87
87
responses = [
88
-
ApiResponse(responseCode ="200", description ="Successfully found a person with the provided HMPPS ID."),
88
+
ApiResponse(responseCode ="200", useReturnTypeSchema =true, description ="Successfully found a person with the provided HMPPS ID."),
summary ="Returns metadata of images associated with a person sorted by captureDateTime (newest first).",
111
111
responses = [
112
-
ApiResponse(responseCode ="200", description ="Successfully found a person with the provided HMPPS ID. If a person doesn't have any images, then an empty list (`[]`) is returned in the `data` property."),
112
+
ApiResponse(responseCode ="200", useReturnTypeSchema =true, description ="Successfully found a person with the provided HMPPS ID. If a person doesn't have any images, then an empty list (`[]`) is returned in the `data` property."),
Copy file name to clipboardexpand all lines: src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/person/PersonResponsibleOfficerController.kt
+1-1
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ class PersonResponsibleOfficerController(
32
32
@Operation(
33
33
summary ="Returns the person responsible officer associated with a person.",
34
34
responses = [
35
-
ApiResponse(responseCode ="200", description ="Successfully found the person responsible officer for a person with the provided HMPPS ID."),
35
+
ApiResponse(responseCode ="200", useReturnTypeSchema =true, description ="Successfully found the person responsible officer for a person with the provided HMPPS ID."),
Copy file name to clipboardexpand all lines: src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/person/ProtectedCharacteristicsController.kt
+1-1
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ class ProtectedCharacteristicsController(
30
30
@Operation(
31
31
summary ="Returns protected characteristics of a person.",
Copy file name to clipboardexpand all lines: src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/person/RiskCategoriesController.kt
+1-1
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ class RiskCategoriesController(
30
30
@Operation(
31
31
summary ="Returns the categories related to an offender.",
32
32
responses = [
33
-
ApiResponse(responseCode ="200", description ="Successfully found risk categories for a person with the provided HMPPS ID."),
33
+
ApiResponse(responseCode ="200", useReturnTypeSchema =true, description ="Successfully found risk categories for a person with the provided HMPPS ID."),
Copy file name to clipboardexpand all lines: src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/person/RiskPredictorScoresController.kt
+1-1
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ class RiskPredictorScoresController(
32
32
@Operation(
33
33
summary ="Returns risk scores from the last year associated with a person, sorted by completedDate (newest first). This endpoint does not serve LAO (Limited Access Offender) data.",
34
34
responses = [
35
-
ApiResponse(responseCode ="200", description ="Successfully found risk scores for a person with the provided HMPPS ID."),
35
+
ApiResponse(responseCode ="200", useReturnTypeSchema =true, description ="Successfully found risk scores for a person with the provided HMPPS ID."),
Copy file name to clipboardexpand all lines: src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/person/RiskSeriousHarmController.kt
+1-1
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ class RiskSeriousHarmController(
30
30
@Operation(
31
31
summary ="Returns Risk of Serious Harm (ROSH) risks associated with a person. Returns only assessments completed in the last year. This endpoint does not serve LAO (Limited Access Offender) data.",
32
32
responses = [
33
-
ApiResponse(responseCode ="200", description ="Successfully found risks for a person with the provided HMPPS ID."),
33
+
ApiResponse(responseCode ="200", useReturnTypeSchema =true, description ="Successfully found risks for a person with the provided HMPPS ID."),
0 commit comments