Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

Commit f4d5d41

Browse files
authored
Merge pull request #14 from hmrc/hipp-1402-fix
HIPP-1402: Fix case issue
2 parents 6a2b691 + 8dd4d68 commit f4d5d41

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

app/uk/gov/hmrc/simpleapideploymentstubs/controllers/SimpleAPiDeploymentController.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class SimpleAPiDeploymentController @Inject()(cc: ControllerComponents) extends
6767
Json.parse(metadata).validate[UpdateMetadata].fold(
6868
_ => BadRequest,
6969
validMetadata => {
70-
logger.info(s"JSON CreateMetadata body: ${Json.prettyPrint(Json.toJson(validMetadata))}")
70+
logger.info(s"JSON UpdateMetadata body: ${Json.prettyPrint(Json.toJson(validMetadata))}")
7171

7272
if (validOas(openapi)) {
7373
Ok(Json.toJson(DeploymentsResponse(serviceId)))

app/uk/gov/hmrc/simpleapideploymentstubs/models/CreateMetadata.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ case class CreateMetadata(
2828
domain: Option[String] = None,
2929
subdomain: Option[String] = None,
3030
backends: Seq[String] = Seq.empty,
31-
prefixestoremove: Seq[String],
32-
egressprefix: String
31+
prefixesToRemove: Seq[String],
32+
egressPrefix: String
3333
)
3434

3535
object CreateMetadata {

app/uk/gov/hmrc/simpleapideploymentstubs/models/DetailsResponse.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ case class DetailsResponse(
2424
domain: String,
2525
subdomain: String,
2626
backends: Seq[String],
27-
egressprefix: String,
28-
prefixestoremove: Seq[String]
27+
egressPrefix: String,
28+
prefixesToRemove: Seq[String]
2929
)
3030

3131
object DetailsResponse {
@@ -36,8 +36,8 @@ object DetailsResponse {
3636
domain = "8",
3737
subdomain = "8.1",
3838
backends = Seq("NPS"),
39-
egressprefix = "/prefix",
40-
prefixestoremove = Seq("/v1")
39+
egressPrefix = "/prefix",
40+
prefixesToRemove = Seq("/v1")
4141
)
4242

4343
implicit val formatDetailsResponse: Format[DetailsResponse] = Json.format[DetailsResponse]

app/uk/gov/hmrc/simpleapideploymentstubs/models/UpdateMetadata.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ case class UpdateMetadata(
2424
domain: Option[String] = None,
2525
subdomain: Option[String] = None,
2626
backends: Seq[String] = Seq.empty,
27-
prefixestoremove: Seq[String],
28-
egressprefix: String
27+
prefixesToRemove: Seq[String],
28+
egressPrefix: String
2929
)
3030

3131
object UpdateMetadata {

test/uk/gov/hmrc/simpleapideploymentstubs/controllers/SimpleAPiDeploymentControllerSpec.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ class SimpleAPiDeploymentControllerSpec extends AnyFreeSpec with Matchers with O
6969
name = "test-name",
7070
description = "test-description",
7171
egress = "test-egress",
72-
prefixestoremove = Seq("test-prefix-1"),
73-
egressprefix = ""
72+
prefixesToRemove = Seq("test-prefix-1"),
73+
egressPrefix = ""
7474
)
7575

7676
running(application) {
@@ -101,8 +101,8 @@ class SimpleAPiDeploymentControllerSpec extends AnyFreeSpec with Matchers with O
101101
name = "test-name",
102102
description = "test-description",
103103
egress = "test-egress",
104-
prefixestoremove = Seq("test-prefix-1"),
105-
egressprefix = ""
104+
prefixesToRemove = Seq("test-prefix-1"),
105+
egressPrefix = ""
106106
)
107107

108108
running(application) {
@@ -157,8 +157,8 @@ class SimpleAPiDeploymentControllerSpec extends AnyFreeSpec with Matchers with O
157157
val metadata = UpdateMetadata(
158158
description = "test-description",
159159
status = "test-status",
160-
prefixestoremove = Seq("test-prefix-1", "test-prefix-2"),
161-
egressprefix = "test-egress-prefix"
160+
prefixesToRemove = Seq("test-prefix-1", "test-prefix-2"),
161+
egressPrefix = "test-egress-prefix"
162162
)
163163

164164
running(application) {
@@ -189,8 +189,8 @@ class SimpleAPiDeploymentControllerSpec extends AnyFreeSpec with Matchers with O
189189
val metadata = UpdateMetadata(
190190
description = "test-description",
191191
status = "test-status",
192-
prefixestoremove = Seq("test-prefix-1", "test-prefix-2"),
193-
egressprefix = "test-egress-prefix"
192+
prefixesToRemove = Seq("test-prefix-1", "test-prefix-2"),
193+
egressPrefix = "test-egress-prefix"
194194
)
195195

196196
running(application) {

0 commit comments

Comments
 (0)