diff --git a/src/main/kotlin/uk/gov/justice/digital/hmpps/approvedpremisesapi/transformer/cas1/Cas1SpaceSearchResultsTransformer.kt b/src/main/kotlin/uk/gov/justice/digital/hmpps/approvedpremisesapi/transformer/cas1/Cas1SpaceSearchResultsTransformer.kt index fa61145468..3110c05712 100644 --- a/src/main/kotlin/uk/gov/justice/digital/hmpps/approvedpremisesapi/transformer/cas1/Cas1SpaceSearchResultsTransformer.kt +++ b/src/main/kotlin/uk/gov/justice/digital/hmpps/approvedpremisesapi/transformer/cas1/Cas1SpaceSearchResultsTransformer.kt @@ -47,7 +47,6 @@ class Cas1SpaceSearchResultsTransformer { }, ), distanceInMiles = candidatePremises.distanceInMiles.toBigDecimal(), - spacesAvailable = listOf(), ) }, ) diff --git a/src/main/resources/static/cas1-schemas.yml b/src/main/resources/static/cas1-schemas.yml index 60e8bb00d2..dcedd6e733 100644 --- a/src/main/resources/static/cas1-schemas.yml +++ b/src/main/resources/static/cas1-schemas.yml @@ -318,23 +318,9 @@ components: distanceInMiles: type: number example: 2.1 - spacesAvailable: - type: array - deprecated: true - description: "This is not populated and will be removed in the future" - items: - $ref: '#/components/schemas/Cas1SpaceAvailability' - Cas1SpaceAvailability: - type: object - deprecated: true - properties: - spaceCharacteristics: - type: array - items: - $ref: '#/components/schemas/Cas1SpaceCharacteristic' - durationInDays: - type: integer - example: 77 + required: + - premises + - distanceInMiles Cas1SpaceCategory: type: string example: arson diff --git a/src/main/resources/static/codegen/built-cas1-api-spec.yml b/src/main/resources/static/codegen/built-cas1-api-spec.yml index ffcbd51cdb..f84b307479 100644 --- a/src/main/resources/static/codegen/built-cas1-api-spec.yml +++ b/src/main/resources/static/codegen/built-cas1-api-spec.yml @@ -6365,23 +6365,9 @@ components: distanceInMiles: type: number example: 2.1 - spacesAvailable: - type: array - deprecated: true - description: "This is not populated and will be removed in the future" - items: - $ref: '#/components/schemas/Cas1SpaceAvailability' - Cas1SpaceAvailability: - type: object - deprecated: true - properties: - spaceCharacteristics: - type: array - items: - $ref: '#/components/schemas/Cas1SpaceCharacteristic' - durationInDays: - type: integer - example: 77 + required: + - premises + - distanceInMiles Cas1SpaceCategory: type: string example: arson diff --git a/src/test/kotlin/uk/gov/justice/digital/hmpps/approvedpremisesapi/unit/transformer/cas1/Cas1SpaceSearchResultsTransformerTest.kt b/src/test/kotlin/uk/gov/justice/digital/hmpps/approvedpremisesapi/unit/transformer/cas1/Cas1SpaceSearchResultsTransformerTest.kt index 2a66808aeb..21756c23f9 100644 --- a/src/test/kotlin/uk/gov/justice/digital/hmpps/approvedpremisesapi/unit/transformer/cas1/Cas1SpaceSearchResultsTransformerTest.kt +++ b/src/test/kotlin/uk/gov/justice/digital/hmpps/approvedpremisesapi/unit/transformer/cas1/Cas1SpaceSearchResultsTransformerTest.kt @@ -89,7 +89,6 @@ class Cas1SpaceSearchResultsTransformerTest { assertThat(premises1.premisesCharacteristics).isEmpty() assertThat(premises1.characteristics).isEmpty() assertThat(actual.results[0].distanceInMiles).isEqualTo(BigDecimal.valueOf(1.0)) - assertThat(actual.results[0].spacesAvailable).isEmpty() val premises2 = actual.results[1].premises assertThat(premises2).isNotNull @@ -107,6 +106,5 @@ class Cas1SpaceSearchResultsTransformerTest { assertThat(premises2.premisesCharacteristics).isEmpty() assertThat(premises2.characteristics).isEmpty() assertThat(actual.results[1].distanceInMiles).isEqualTo(BigDecimal.valueOf(2.0)) - assertThat(actual.results[1].spacesAvailable).isEmpty() } }