From 44fee7a13322f09e0d24c283a5f0166cf9629ec6 Mon Sep 17 00:00:00 2001 From: dgeorgiev Date: Tue, 25 Jun 2024 07:10:23 +0000 Subject: [PATCH] [WTCH-332] Fix params names for WeContractServiceApiFeign.contractKeys method --- .../client/feign/contract/WeContractServiceApiFeign.kt | 8 ++++---- .../feign/contract/WeContractServiceApiFeignTest.kt | 3 +++ .../resources/mappings/contract/contract_keys_200.json | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/we-node-client-http/we-node-client-feign-client/src/main/kotlin/com/wavesenterprise/sdk/node/client/feign/contract/WeContractServiceApiFeign.kt b/we-node-client-http/we-node-client-feign-client/src/main/kotlin/com/wavesenterprise/sdk/node/client/feign/contract/WeContractServiceApiFeign.kt index acb03c37..5f658ce1 100644 --- a/we-node-client-http/we-node-client-feign-client/src/main/kotlin/com/wavesenterprise/sdk/node/client/feign/contract/WeContractServiceApiFeign.kt +++ b/we-node-client-http/we-node-client-feign-client/src/main/kotlin/com/wavesenterprise/sdk/node/client/feign/contract/WeContractServiceApiFeign.kt @@ -15,12 +15,12 @@ interface WeContractServiceApiFeign { @Param("key") key: String, ): Optional - @RequestLine("GET /contracts/{contractId}?offset={offset}&matches={matches}&limit={limit}") + @RequestLine("GET /contracts/{contractId}?limit={limit}&offset={offset}&matches={matches}") fun contractKeys( @Param("contractId") contractId: String, - @Param("offset") limit: Int? = null, - @Param("matches") offset: Int? = null, - @Param("limit") matches: String? = null, + @Param("limit") limit: Int? = null, + @Param("offset") offset: Int? = null, + @Param("matches") matches: String? = null, ): List @RequestLine("GET /contracts/info/{contractId}") diff --git a/we-node-client-http/we-node-client-feign-client/src/test/kotlin/com/wavesenterprise/sdk/node/client/feign/contract/WeContractServiceApiFeignTest.kt b/we-node-client-http/we-node-client-feign-client/src/test/kotlin/com/wavesenterprise/sdk/node/client/feign/contract/WeContractServiceApiFeignTest.kt index 52193237..6096b1b6 100644 --- a/we-node-client-http/we-node-client-feign-client/src/test/kotlin/com/wavesenterprise/sdk/node/client/feign/contract/WeContractServiceApiFeignTest.kt +++ b/we-node-client-http/we-node-client-feign-client/src/test/kotlin/com/wavesenterprise/sdk/node/client/feign/contract/WeContractServiceApiFeignTest.kt @@ -67,6 +67,9 @@ internal class WeContractServiceApiFeignTest { fun `should get contract keys`() { val dataEntryDtoList = weContractServiceApiFeign.contractKeys( contractId = "8mYpzj5rVVQSp2DgsyMvoMSViHtX94dJHkPyX2xo855y", + limit = 3, + offset = 3, + matches = "any_match", ) dataEntryDtoList.apply { diff --git a/we-node-client-http/we-node-client-feign-client/src/test/resources/mappings/contract/contract_keys_200.json b/we-node-client-http/we-node-client-feign-client/src/test/resources/mappings/contract/contract_keys_200.json index 4a7adc38..7a00491f 100644 --- a/we-node-client-http/we-node-client-feign-client/src/test/resources/mappings/contract/contract_keys_200.json +++ b/we-node-client-http/we-node-client-feign-client/src/test/resources/mappings/contract/contract_keys_200.json @@ -1,7 +1,7 @@ { "request": { "method": "GET", - "url": "/contracts/8mYpzj5rVVQSp2DgsyMvoMSViHtX94dJHkPyX2xo855y" + "url": "/contracts/8mYpzj5rVVQSp2DgsyMvoMSViHtX94dJHkPyX2xo855y?limit=3&offset=3&matches=any_match" }, "response": { "status": 200,