Skip to content

Commit f21cdfa

Browse files
Document that create visit endpoint creates an approved visit (#777)
* Remove documentation that does not apply to our API. * Update summaries of endpoints to make clearer that they are reporting external systems. * Add warning of no checking of the visit suitability. * Remove superfluous breaks. * Provide more detail on return value of visitor restrictions. * Reword future visits endpoint summary. * Reword prisoner visit-restrictions endpoint. * Reword visit-orders summary. * Bring description onto one line to fix generated html. * Remove double brs * Typo.
1 parent a0004de commit f21cdfa

File tree

7 files changed

+18
-18
lines changed

7 files changed

+18
-18
lines changed

src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/HmppsIdController.kt

+1-4
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,7 @@ class HmppsIdController(
6060
@GetMapping("nomis-number/by-hmpps-id/{hmppsId}")
6161
@Operation(
6262
summary = "Return nomis number for a given HMPPS Id",
63-
description = """
64-
Accepts a HMPPS Id (hmppsId) and looks up the corresponding nomis number.<br>
65-
<b>Applicable filters</b>: <ul><li>prisons</li></ul>
66-
""",
63+
description = "Accepts a HMPPS Id (hmppsId) and looks up the corresponding nomis number.<br><b>Applicable filters</b>: <ul><li>prisons</li></ul>",
6764
responses = [
6865
ApiResponse(responseCode = "200", useReturnTypeSchema = true),
6966
ApiResponse(responseCode = "404", description = "Nomis number could not be found."),

src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/OffenderRestrictionsController.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class OffenderRestrictionsController(
3131
@GetMapping("/v1/prison/{prisonId}/prisoners/{hmppsId}/non-associations")
3232
@Operation(
3333
summary = "Returns a single prisoners list of non associates.",
34-
description = "<b>Applicable filters</b>: <ul><li>prisons</li></ul> <br> includeOpen is true by default, includeClosed is false by default. At least one must be true. The role READ_NON_ASSOCIATIONS is required for this endpoint.",
34+
description = "<b>Applicable filters</b>: <ul><li>prisons</li></ul> <br> includeOpen is true by default, includeClosed is false by default. At least one must be true.",
3535
responses = [
3636
ApiResponse(responseCode = "200", useReturnTypeSchema = true, description = "Successfully found prisoners non associates."),
3737
ApiResponse(

src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/TransactionsController.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ class TransactionsController(
182182

183183
@Operation(
184184
summary = "Make a financial transaction.",
185-
description = "<a href=\"#schema-transactionrequest\">Request body</a><br><br><b>Applicable filters</b>: <ul><li>prisons</li></ul>",
185+
description = "<a href=\"#schema-transactionrequest\">Request body</a><br><b>Applicable filters</b>: <ul><li>prisons</li></ul>",
186186
responses = [
187187
ApiResponse(responseCode = "200", useReturnTypeSchema = true, description = "Successfully created a transaction."),
188188
ApiResponse(
@@ -255,7 +255,7 @@ class TransactionsController(
255255

256256
@Operation(
257257
summary = "Transfer funds between the accounts of a prisoner.",
258-
description = "Currently only able to move from spends to savings.<br><br><a href=\"#schema-transactiontransferrequest\">Request body</a><br><br><b>Applicable filters</b>: <ul><li>prisons</li></ul>",
258+
description = "Currently only able to move from spends to savings.<br><a href=\"#schema-transactiontransferrequest\">Request body</a><br><br><b>Applicable filters</b>: <ul><li>prisons</li></ul>",
259259
responses = [
260260
ApiResponse(responseCode = "200", useReturnTypeSchema = true, description = "Successfully created a transaction transfer."),
261261
ApiResponse(

src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/VisitsController.kt

+8-5
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class VisitsController(
3737
) {
3838
@Operation(
3939
summary = "Get visit information for a visit by visit reference.",
40-
description = "<br><br><b>Applicable filters</b>: <ul><li>prisons</li></ul>",
40+
description = "<b>Applicable filters</b>: <ul><li>prisons</li></ul>",
4141
responses = [
4242
ApiResponse(responseCode = "200", useReturnTypeSchema = true, description = "Successfully found visit information for a given visit reference."),
4343
ApiResponse(
@@ -80,8 +80,11 @@ class VisitsController(
8080
}
8181

8282
@Operation(
83-
summary = "Create visit.",
84-
description = "<br><br><b>Applicable filters</b>: <ul><li>prisons</li></ul>",
83+
summary = "Report the creation of a visit in an external system.",
84+
description =
85+
"This API only validates the existence of the entities included. It does not perform any checking of the suitability of the visit. " +
86+
"That responsibility is left to the client." +
87+
"<br><b>Applicable filters</b>: <ul><li>prisons</li></ul>",
8588
responses = [
8689
ApiResponse(responseCode = "200", useReturnTypeSchema = true, description = "Successfully wrote to visit queue."),
8790
ApiResponse(
@@ -138,8 +141,8 @@ class VisitsController(
138141
}
139142

140143
@Operation(
141-
summary = "Cancel visit.",
142-
description = "<br><br><b>Applicable filters</b>: <ul><li>prisons</li></ul>",
144+
summary = "Report the cancellation of a visit in an external system.",
145+
description = "<b>Applicable filters</b>: <ul><li>prisons</li></ul>",
143146
responses = [
144147
ApiResponse(responseCode = "200", useReturnTypeSchema = true, description = "Successfully wrote to visit queue."),
145148
ApiResponse(

src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/person/FutureVisitsController.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class FutureVisitsController(
3030
@Autowired val getFutureVisitsService: GetFutureVisitsService,
3131
) {
3232
@Operation(
33-
summary = "Get Future Visit Information.",
33+
summary = "Get information about a prisoner's future visits.",
3434
description = "<b>Applicable filters</b>: <ul><li>prisons</li></ul>",
3535
responses = [
3636
ApiResponse(responseCode = "200", useReturnTypeSchema = true, description = "Successfully found a person's future visits with the provided HMPPS ID."),

src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/person/PersonController.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ class PersonController(
235235

236236
@GetMapping("{hmppsId}/visit-orders")
237237
@Operation(
238-
summary = "Returns visit orders.",
238+
summary = "Returns the number of remaining visit orders a prisoner has.",
239239
responses = [
240240
ApiResponse(responseCode = "200", useReturnTypeSchema = true, description = "Successfully found a prisoners visit orders."),
241241
ApiResponse(responseCode = "404", content = [Content(schema = Schema(ref = "#/components/schemas/PersonNotFound"))]),

src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/controllers/v1/person/VisitRestrictionsController.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ class VisitRestrictionsController(
3232
@Autowired val getVisitorRestrictionsService: GetVisitorRestrictionsService,
3333
) {
3434
@Operation(
35-
summary = "Gets restrictions for latest booking.",
36-
description = "Returns a list of restrictions for the latest booking",
35+
summary = "Gets visit restrictions for a prisoner.",
36+
description = "Returns a prisoner's visit restrictions. Only returns the visit restrictions for the prisoner's most recent booking.",
3737
responses = [
3838
ApiResponse(responseCode = "200", useReturnTypeSchema = true, description = "Successfully found a person's visit restrictions with the provided HMPPS ID."),
3939
ApiResponse(responseCode = "400", content = [Content(schema = Schema(ref = "#/components/schemas/BadRequest"))]),
@@ -60,8 +60,8 @@ class VisitRestrictionsController(
6060
}
6161

6262
@Operation(
63-
summary = "Gets visitor restrictions.",
64-
description = "Returns visitor restrictions for a prisoner",
63+
summary = "Get the restrictions for a visitor.",
64+
description = "Provides both the global restrictions for the visitor, as well as the restrictions for the relationship between the prisoner and visitor.",
6565
responses = [
6666
ApiResponse(responseCode = "200", useReturnTypeSchema = true, description = "Successfully found a prisoners vistor restrictions with the provided HMPPS ID and contact ID."),
6767
ApiResponse(responseCode = "400", content = [Content(schema = Schema(ref = "#/components/schemas/BadRequest"))]),

0 commit comments

Comments
 (0)