[MGNLRESTCL-103] RestCallDefinition are wrapped multiple times with MutableWrapper Created: 26/Nov/19  Updated: 09/Jan/20  Resolved: 30/Dec/19

Status: Closed
Project: REST Client
Component/s: None
Affects Version/s: 2.0
Fix Version/s: 2.0

Type: Bug Priority: Neutral
Reporter: Jaroslav Simak Assignee: Dai Ha
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 1d 2.5h
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Epic Link: Declarative REST clients
Sprint: Declarative REST 12, Declarative REST 13
Story Points: 3

 Description   

RestCallDefinitions are first wrapped on the Registry level where we wrap the RestClientDefinition, and then again in the DefaultRestClient.

@Override
    public Response invoke(String restCallName, Object body, Map<String, Object> additionalDefaultValues) {
        return ifClientCallExists(restCallName, () -> {
            RestCallDefinition restCallDefinition = MutableWrapper.wrap(restClientDefinition.getRestCalls().get(restCallName));
            return invoke(restCallDefinition, body, additionalDefaultValues);
        });
    }

Same also happens in the getter of the DefaultRestClient:

@Override
    public RestClientDefinition getRestClientDefinition() {
        return MutableWrapper.wrap(restClientDefinition);
    }

restClientDefinition is already wrapped and getter wraps it again.



 Comments   
Comment by Dai Ha [ 09/Jan/20 ]

Also, mdrapela, I made a modification on rest client name: proxyDefinitions -> proxies. Please be informed. Thank you!

Generated at Mon Feb 12 10:43:15 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.