generated from ministryofjustice/hmpps-template-kotlin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Updated environment name for dev from "dev" to "development" to match infrastructure. * Removed rename-project workflow * Set security scans to send alerts to the connect DPS dev channel. * CDPS-1054: Added Prison API url and client credentials to helm values. * CDPS-1054: Setup docker compose for running locally. * CDPS-1054: Added prison API details to application properties. * CDPS-1054: Updated the template references in banner and log config. * CDP-1054: Template Iteration 1 API added to Core Person Record and Protected Characteristics domains. * CDPS-1054: Template tests added for iteration 1 API. * CDPS-1054: Corrected typo in app name. * CDPS-1054: Set SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_JWK_SET_URI to the local hmpps auth container url * CDPS-1054: Lint issues fixed. * CDPS-1054: Switch helm lint environment name from development to dev. * CDPS-1054: Updated resource and service tests for core person record. * CDPS-1054: Added basic tests for prototype functionality and applied auto-formating. * CDPS-1054: Updated roles to be read or read/write and allowed access to reference data to either role. * CDPS-1054: Updated app name on open api spec. * CDPS-1054: Updated the docker-compose file to use container names instead of localhost. * CDPS-1054: Remove wildcard import. * CDPS-1054: Added service specific timeouts to web clients. * CDPS-1054: Switched PUT and PATCH endpoints to return No Content on success. * CDPS-1054: Fixed description for field value property. * CDPS-1054: Updated image update test to expect a no content response. * CDPS-1054: Corrected prison api port number in docker compose.
- Loading branch information
Showing
61 changed files
with
1,633 additions
and
613 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,5 @@ jobs: | |
name: Kotlin security OWASP dependency check | ||
uses: ministryofjustice/hmpps-github-actions/.github/workflows/[email protected] # WORKFLOW_VERSION | ||
with: | ||
channel_id: C05J915DX0Q | ||
channel_id: C04JFG3QJE6 | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,5 @@ jobs: | |
name: Project security trivy dependency check | ||
uses: ministryofjustice/hmpps-github-actions/.github/workflows/[email protected] # WORKFLOW_VERSION | ||
with: | ||
channel_id: C05J915DX0Q | ||
channel_id: C04JFG3QJE6 | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,5 @@ jobs: | |
name: Project security veracode pipeline scan | ||
uses: ministryofjustice/hmpps-github-actions/.github/workflows/[email protected] # WORKFLOW_VERSION | ||
with: | ||
channel_id: C05J915DX0Q | ||
channel_id: C04JFG3QJE6 | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,5 @@ jobs: | |
name: Project security veracode policy scan | ||
uses: ministryofjustice/hmpps-github-actions/.github/workflows/[email protected] # WORKFLOW_VERSION | ||
with: | ||
channel_id: C05J915DX0Q | ||
channel_id: C04JFG3QJE6 | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...ain/kotlin/uk/gov/justice/digital/hmpps/personintegrationapi/HmppsPersonIntegrationApi.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
package uk.gov.justice.digital.hmpps.templatepackagename | ||
package uk.gov.justice.digital.hmpps.personintegrationapi | ||
|
||
import org.springframework.boot.autoconfigure.SpringBootApplication | ||
import org.springframework.boot.runApplication | ||
|
||
@SpringBootApplication | ||
class HmppsTemplateKotlin | ||
class HmppsPersonIntegrationApi | ||
|
||
fun main(args: Array<String>) { | ||
runApplication<HmppsTemplateKotlin>(*args) | ||
runApplication<HmppsPersonIntegrationApi>(*args) | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/kotlin/uk/gov/justice/digital/hmpps/personintegrationapi/common/Constants.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package uk.gov.justice.digital.hmpps.personintegrationapi.common | ||
|
||
object Constants { | ||
const val PRISONER_NUMBER_REGEX = "^[A-Za-z0-9]{1,10}\$" | ||
const val PRISONER_NUMBER_VALIDATION_MESSAGE = | ||
"The prisoner number must be a alphanumeric string upto 10 characters in length." | ||
} |
23 changes: 23 additions & 0 deletions
23
...k/gov/justice/digital/hmpps/personintegrationapi/common/annotation/ValidPrisonerNumber.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package uk.gov.justice.digital.hmpps.personintegrationapi.common.annotation | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema | ||
import jakarta.validation.constraints.Pattern | ||
import uk.gov.justice.digital.hmpps.personintegrationapi.common.Constants | ||
|
||
@Schema( | ||
description = Constants.PRISONER_NUMBER_VALIDATION_MESSAGE, | ||
example = "A12345", | ||
pattern = Constants.PRISONER_NUMBER_REGEX, | ||
) | ||
@Pattern( | ||
regexp = Constants.PRISONER_NUMBER_REGEX, | ||
message = Constants.PRISONER_NUMBER_VALIDATION_MESSAGE, | ||
) | ||
@Target( | ||
AnnotationTarget.FIELD, | ||
AnnotationTarget.VALUE_PARAMETER, | ||
) | ||
@Retention( | ||
AnnotationRetention.RUNTIME, | ||
) | ||
annotation class ValidPrisonerNumber |
17 changes: 17 additions & 0 deletions
17
...kotlin/uk/gov/justice/digital/hmpps/personintegrationapi/common/client/PrisonApiClient.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package uk.gov.justice.digital.hmpps.personintegrationapi.common.client | ||
|
||
import org.springframework.http.ResponseEntity | ||
import org.springframework.web.bind.annotation.PathVariable | ||
import org.springframework.web.bind.annotation.RequestBody | ||
import org.springframework.web.service.annotation.HttpExchange | ||
import org.springframework.web.service.annotation.PutExchange | ||
import uk.gov.justice.digital.hmpps.personintegrationapi.common.client.dto.UpdateBirthPlace | ||
|
||
@HttpExchange("/api/offenders") | ||
interface PrisonApiClient { | ||
@PutExchange("/{offenderNo}/birth-place") | ||
fun updateBirthPlaceForWorkingName( | ||
@PathVariable offenderNo: String, | ||
@RequestBody updateBirthPlace: UpdateBirthPlace, | ||
): ResponseEntity<Void> | ||
} |
9 changes: 9 additions & 0 deletions
9
...n/uk/gov/justice/digital/hmpps/personintegrationapi/common/client/dto/UpdateBirthPlace.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package uk.gov.justice.digital.hmpps.personintegrationapi.common.client.dto | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema | ||
|
||
@Schema(description = "Update to prisoner birth place (city or town of birth)") | ||
data class UpdateBirthPlace( | ||
@Schema(description = "Birth place (city or town of birth)", example = "SHEFFIELD") | ||
val birthPlace: String, | ||
) |
Oops, something went wrong.