diff --git a/mdx-gateway-generator/gradle.lockfile b/mdx-gateway-generator/gradle.lockfile index 99b84093..8efb20cf 100644 --- a/mdx-gateway-generator/gradle.lockfile +++ b/mdx-gateway-generator/gradle.lockfile @@ -10,8 +10,8 @@ com.fasterxml.jackson:jackson-bom:2.22.0=runtimeClasspath,testRuntimeClasspath com.fasterxml.woodstox:woodstox-core:7.2.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath com.github.rholder:guava-retrying:2.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath com.github.spotbugs:spotbugs-annotations:4.10.2=annotationProcessor,testAnnotationProcessor -com.github.spotbugs:spotbugs-annotations:4.10.3=compileClasspath,spotbugs,testCompileClasspath -com.github.spotbugs:spotbugs:4.10.3=spotbugs +com.github.spotbugs:spotbugs-annotations:4.10.4=compileClasspath,spotbugs,testCompileClasspath +com.github.spotbugs:spotbugs:4.10.4=spotbugs com.github.stephenc.jcip:jcip-annotations:1.0-1=spotbugs com.google.code.findbugs:jsr305:3.0.2=annotationProcessor,compileClasspath,runtimeClasspath,spotbugs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath com.google.code.gson:gson:2.14.0=compileClasspath,runtimeClasspath,spotbugs,testCompileClasspath,testRuntimeClasspath @@ -78,7 +78,6 @@ org.junit.platform:junit-platform-engine:1.14.1=testCompileClasspath,testRuntime org.junit.platform:junit-platform-launcher:1.14.1=testRuntimeClasspath org.junit:junit-bom:5.14.1=testCompileClasspath,testRuntimeClasspath org.junit:junit-bom:6.1.0=annotationProcessor,testAnnotationProcessor -org.junit:junit-bom:6.1.2=spotbugs org.mockito:mockito-core:5.23.0=testCompileClasspath,testRuntimeClasspath org.objenesis:objenesis:3.3=runtimeClasspath,testRuntimeClasspath org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath @@ -100,8 +99,8 @@ org.spockframework:spock-bom:2.4-groovy-4.0=testCompileClasspath,testRuntimeClas org.spockframework:spock-core:2.4-groovy-4.0=testCompileClasspath,testRuntimeClasspath org.xmlresolver:xmlresolver:5.3.3=spotbugs org.yaml:snakeyaml:2.4=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -tools.jackson.core:jackson-core:3.2.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -tools.jackson.core:jackson-databind:3.2.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -tools.jackson.dataformat:jackson-dataformat-xml:3.2.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -tools.jackson:jackson-bom:3.2.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +tools.jackson.core:jackson-core:3.2.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +tools.jackson.core:jackson-databind:3.2.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +tools.jackson.dataformat:jackson-dataformat-xml:3.2.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +tools.jackson:jackson-bom:3.2.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath empty=spotbugsPlugins diff --git a/mdx-gateways/gradle.lockfile b/mdx-gateways/gradle.lockfile index d6563591..5ee8ed26 100644 --- a/mdx-gateways/gradle.lockfile +++ b/mdx-gateways/gradle.lockfile @@ -11,8 +11,8 @@ com.fasterxml.woodstox:woodstox-core:7.2.1=annotationProcessor,compileClasspath, com.github.oowekyala.ooxml:nice-xml-messages:3.1=pmd com.github.rholder:guava-retrying:2.0.0=annotationProcessor,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath com.github.spotbugs:spotbugs-annotations:4.10.2=annotationProcessor,testAnnotationProcessor -com.github.spotbugs:spotbugs-annotations:4.10.3=compileClasspath,spotbugs,testCompileClasspath -com.github.spotbugs:spotbugs:4.10.3=spotbugs +com.github.spotbugs:spotbugs-annotations:4.10.4=compileClasspath,spotbugs,testCompileClasspath +com.github.spotbugs:spotbugs:4.10.4=spotbugs com.github.stephenc.jcip:jcip-annotations:1.0-1=spotbugs com.google.code.findbugs:jsr305:3.0.2=annotationProcessor,checkstyle,compileClasspath,runtimeClasspath,spotbugs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath com.google.code.gson:gson:2.13.2=pmd @@ -110,7 +110,6 @@ org.junit.platform:junit-platform-engine:1.14.1=testCompileClasspath,testRuntime org.junit.platform:junit-platform-launcher:1.14.1=testRuntimeClasspath org.junit:junit-bom:5.14.1=testCompileClasspath,testRuntimeClasspath org.junit:junit-bom:6.1.0=annotationProcessor,testAnnotationProcessor -org.junit:junit-bom:6.1.2=spotbugs org.mockito:mockito-core:5.23.0=testCompileClasspath,testRuntimeClasspath org.objenesis:objenesis:3.3=annotationProcessor,runtimeClasspath,testRuntimeClasspath org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath @@ -138,8 +137,8 @@ org.spockframework:spock-bom:2.4-groovy-4.0=testCompileClasspath,testRuntimeClas org.spockframework:spock-core:2.4-groovy-4.0=testCompileClasspath,testRuntimeClasspath org.xmlresolver:xmlresolver:5.3.3=checkstyle,pmd,spotbugs org.yaml:snakeyaml:2.4=annotationProcessor,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -tools.jackson.core:jackson-core:3.2.1=annotationProcessor,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -tools.jackson.core:jackson-databind:3.2.1=annotationProcessor,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -tools.jackson.dataformat:jackson-dataformat-xml:3.2.1=annotationProcessor,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -tools.jackson:jackson-bom:3.2.1=annotationProcessor,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +tools.jackson.core:jackson-core:3.2.2=annotationProcessor,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +tools.jackson.core:jackson-databind:3.2.2=annotationProcessor,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +tools.jackson.dataformat:jackson-dataformat-xml:3.2.2=annotationProcessor,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +tools.jackson:jackson-bom:3.2.2=annotationProcessor,compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath empty=spotbugsPlugins diff --git a/mdx-models/gradle.lockfile b/mdx-models/gradle.lockfile index ad2cf3a0..d932a331 100644 --- a/mdx-models/gradle.lockfile +++ b/mdx-models/gradle.lockfile @@ -11,8 +11,8 @@ com.fasterxml.woodstox:woodstox-core:7.2.1=compileClasspath,runtimeClasspath,tes com.github.oowekyala.ooxml:nice-xml-messages:3.1=pmd com.github.rholder:guava-retrying:2.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath com.github.spotbugs:spotbugs-annotations:4.10.2=annotationProcessor,testAnnotationProcessor -com.github.spotbugs:spotbugs-annotations:4.10.3=compileClasspath,spotbugs,testCompileClasspath -com.github.spotbugs:spotbugs:4.10.3=spotbugs +com.github.spotbugs:spotbugs-annotations:4.10.4=compileClasspath,spotbugs,testCompileClasspath +com.github.spotbugs:spotbugs:4.10.4=spotbugs com.github.stephenc.jcip:jcip-annotations:1.0-1=spotbugs com.google.code.findbugs:jsr305:3.0.2=annotationProcessor,checkstyle,compileClasspath,runtimeClasspath,spotbugs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath com.google.code.gson:gson:2.13.2=pmd @@ -107,7 +107,6 @@ org.junit.platform:junit-platform-engine:1.14.1=testCompileClasspath,testRuntime org.junit.platform:junit-platform-launcher:1.14.1=testRuntimeClasspath org.junit:junit-bom:5.14.1=testCompileClasspath,testRuntimeClasspath org.junit:junit-bom:6.1.0=annotationProcessor,testAnnotationProcessor -org.junit:junit-bom:6.1.2=spotbugs org.mockito:mockito-core:5.23.0=testCompileClasspath,testRuntimeClasspath org.objenesis:objenesis:3.3=runtimeClasspath,testRuntimeClasspath org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath @@ -133,8 +132,8 @@ org.spockframework:spock-bom:2.4-groovy-4.0=testCompileClasspath,testRuntimeClas org.spockframework:spock-core:2.4-groovy-4.0=testCompileClasspath,testRuntimeClasspath org.xmlresolver:xmlresolver:5.3.3=checkstyle,pmd,spotbugs org.yaml:snakeyaml:2.4=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -tools.jackson.core:jackson-core:3.2.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -tools.jackson.core:jackson-databind:3.2.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -tools.jackson.dataformat:jackson-dataformat-xml:3.2.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -tools.jackson:jackson-bom:3.2.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +tools.jackson.core:jackson-core:3.2.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +tools.jackson.core:jackson-databind:3.2.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +tools.jackson.dataformat:jackson-dataformat-xml:3.2.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +tools.jackson:jackson-bom:3.2.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath empty=spotbugsPlugins diff --git a/mdx-models/src/main/java/com/mx/path/model/mdx/accessor/managed_card/ManagedCardAlertBaseAccessor.java b/mdx-models/src/main/java/com/mx/path/model/mdx/accessor/managed_card/ManagedCardAlertBaseAccessor.java index b044f573..bd2c136b 100644 --- a/mdx-models/src/main/java/com/mx/path/model/mdx/accessor/managed_card/ManagedCardAlertBaseAccessor.java +++ b/mdx-models/src/main/java/com/mx/path/model/mdx/accessor/managed_card/ManagedCardAlertBaseAccessor.java @@ -49,12 +49,13 @@ public AccessorResponse> list(String cardId) { * Update a managed card alert * * @param cardId + * @param alertId * @param alert * @return */ @GatewayAPI @API(description = "Update a managed card alert") - public AccessorResponse update(String cardId, Alert alert) { + public AccessorResponse update(String cardId, String alertId, Alert alert) { throw new AccessorMethodNotImplementedException(); } diff --git a/mdx-models/src/test/groovy/com/mx/path/model/mdx/accessor/managed_card/ManagedCardAlertBaseAccessorTest.groovy b/mdx-models/src/test/groovy/com/mx/path/model/mdx/accessor/managed_card/ManagedCardAlertBaseAccessorTest.groovy index 4454e112..99b56e30 100644 --- a/mdx-models/src/test/groovy/com/mx/path/model/mdx/accessor/managed_card/ManagedCardAlertBaseAccessorTest.groovy +++ b/mdx-models/src/test/groovy/com/mx/path/model/mdx/accessor/managed_card/ManagedCardAlertBaseAccessorTest.groovy @@ -24,7 +24,7 @@ class ManagedCardAlertBaseAccessorTest extends Specification { } def "update throws"() { - when: subject.update("cardId", null) + when: subject.update("cardId", "alertId", null) then: thrown(AccessorMethodNotImplementedException) } diff --git a/mdx-web/gradle.lockfile b/mdx-web/gradle.lockfile index a739cc8a..2ee17daa 100644 --- a/mdx-web/gradle.lockfile +++ b/mdx-web/gradle.lockfile @@ -15,8 +15,8 @@ com.fasterxml.woodstox:woodstox-core:7.1.1=compileClasspath,runtimeClasspath,tes com.github.oowekyala.ooxml:nice-xml-messages:3.1=pmd com.github.rholder:guava-retrying:2.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath com.github.spotbugs:spotbugs-annotations:4.10.2=annotationProcessor,compileClasspath,testAnnotationProcessor,testCompileClasspath -com.github.spotbugs:spotbugs-annotations:4.10.3=spotbugs -com.github.spotbugs:spotbugs:4.10.3=spotbugs +com.github.spotbugs:spotbugs-annotations:4.10.4=spotbugs +com.github.spotbugs:spotbugs:4.10.4=spotbugs com.github.stephenc.jcip:jcip-annotations:1.0-1=spotbugs com.google.code.findbugs:jsr305:3.0.2=annotationProcessor,checkstyle,compileClasspath,runtimeClasspath,spotbugs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath com.google.code.gson:gson:2.13.2=compileClasspath,pmd,runtimeClasspath,testCompileClasspath,testRuntimeClasspath @@ -128,7 +128,6 @@ org.junit.platform:junit-platform-engine:6.0.3=testCompileClasspath,testRuntimeC org.junit.platform:junit-platform-launcher:6.0.3=testRuntimeClasspath org.junit:junit-bom:6.0.3=testCompileClasspath,testRuntimeClasspath org.junit:junit-bom:6.1.0=annotationProcessor,testAnnotationProcessor -org.junit:junit-bom:6.1.2=spotbugs org.mockito:mockito-core:5.23.0=testCompileClasspath,testRuntimeClasspath org.mockito:mockito-junit-jupiter:5.23.0=testCompileClasspath,testRuntimeClasspath org.objenesis:objenesis:3.3=runtimeClasspath,testRuntimeClasspath diff --git a/mdx-web/src/main/java/com/mx/path/model/mdx/web/controller/ManagedCardAlertsController.java b/mdx-web/src/main/java/com/mx/path/model/mdx/web/controller/ManagedCardAlertsController.java index dc70a877..87d3d0ee 100644 --- a/mdx-web/src/main/java/com/mx/path/model/mdx/web/controller/ManagedCardAlertsController.java +++ b/mdx-web/src/main/java/com/mx/path/model/mdx/web/controller/ManagedCardAlertsController.java @@ -30,8 +30,8 @@ public final ResponseEntity> getAlertList(@PathVariable("cardId") } @RequestMapping(value = "/users/{userId}/managed_cards/{cardId}/alerts/{id}", method = RequestMethod.PUT, consumes = BaseController.MDX_MEDIA) - public final ResponseEntity updateAlert(@PathVariable("cardId") String cardId, @RequestBody Alert alert) { - AccessorResponse response = gateway().managedCards().alerts().update(cardId, alert); + public final ResponseEntity updateAlert(@PathVariable("cardId") String cardId, @PathVariable("id") String alertId, @RequestBody Alert alert) { + AccessorResponse response = gateway().managedCards().alerts().update(cardId, alertId, alert); return new ResponseEntity<>(response.getResult().wrapped(), createMultiMapForResponse(response.getHeaders()), HttpStatus.OK); } diff --git a/mdx-web/src/test/groovy/com/mx/path/model/mdx/web/controller/ManagedCardAlertsControllerTest.groovy b/mdx-web/src/test/groovy/com/mx/path/model/mdx/web/controller/ManagedCardAlertsControllerTest.groovy index 7f33551a..c3345af7 100644 --- a/mdx-web/src/test/groovy/com/mx/path/model/mdx/web/controller/ManagedCardAlertsControllerTest.groovy +++ b/mdx-web/src/test/groovy/com/mx/path/model/mdx/web/controller/ManagedCardAlertsControllerTest.groovy @@ -70,15 +70,16 @@ class ManagedCardAlertsControllerTest extends Specification { def "updateAlert interacts with gateway"() { given: + def alertId = "alert-id" def cardId = "card-id" def alert = new Alert() when: - doReturn(new AccessorResponse().withResult(alert)).when(alertGateway).update(cardId, alert) - def response = subject.updateAlert(cardId, alert) + doReturn(new AccessorResponse().withResult(alert)).when(alertGateway).update(cardId, alertId, alert) + def response = subject.updateAlert(cardId, alertId, alert) then: - verify(alertGateway).update(cardId, alert) || true + verify(alertGateway).update(cardId, alertId, alert) || true response.body == alert } diff --git a/realtime/gradle.lockfile b/realtime/gradle.lockfile index 42dec38f..98699264 100644 --- a/realtime/gradle.lockfile +++ b/realtime/gradle.lockfile @@ -11,8 +11,8 @@ com.fasterxml.woodstox:woodstox-core:7.2.1=compileClasspath,runtimeClasspath,tes com.github.oowekyala.ooxml:nice-xml-messages:3.1=pmd com.github.rholder:guava-retrying:2.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath com.github.spotbugs:spotbugs-annotations:4.10.2=annotationProcessor,testAnnotationProcessor -com.github.spotbugs:spotbugs-annotations:4.10.3=compileClasspath,spotbugs,testCompileClasspath -com.github.spotbugs:spotbugs:4.10.3=spotbugs +com.github.spotbugs:spotbugs-annotations:4.10.4=compileClasspath,spotbugs,testCompileClasspath +com.github.spotbugs:spotbugs:4.10.4=spotbugs com.github.stephenc.jcip:jcip-annotations:1.0-1=spotbugs com.google.code.findbugs:jsr305:3.0.2=annotationProcessor,checkstyle,compileClasspath,runtimeClasspath,spotbugs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath com.google.code.gson:gson:2.13.2=pmd @@ -108,7 +108,6 @@ org.junit.platform:junit-platform-engine:1.14.1=testCompileClasspath,testRuntime org.junit.platform:junit-platform-launcher:1.14.1=testRuntimeClasspath org.junit:junit-bom:5.14.1=testCompileClasspath,testRuntimeClasspath org.junit:junit-bom:6.1.0=annotationProcessor,testAnnotationProcessor -org.junit:junit-bom:6.1.2=spotbugs org.mockito:mockito-core:5.23.0=testCompileClasspath,testRuntimeClasspath org.objenesis:objenesis:3.3=runtimeClasspath,testRuntimeClasspath org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath @@ -134,8 +133,8 @@ org.spockframework:spock-bom:2.4-groovy-4.0=testCompileClasspath,testRuntimeClas org.spockframework:spock-core:2.4-groovy-4.0=testCompileClasspath,testRuntimeClasspath org.xmlresolver:xmlresolver:5.3.3=checkstyle,pmd,spotbugs org.yaml:snakeyaml:2.4=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -tools.jackson.core:jackson-core:3.2.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -tools.jackson.core:jackson-databind:3.2.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -tools.jackson.dataformat:jackson-dataformat-xml:3.2.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -tools.jackson:jackson-bom:3.2.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +tools.jackson.core:jackson-core:3.2.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +tools.jackson.core:jackson-databind:3.2.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +tools.jackson.dataformat:jackson-dataformat-xml:3.2.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +tools.jackson:jackson-bom:3.2.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath empty=spotbugsPlugins