[MGNLRESTCL-65] Declare rest calls using definitions (as opposed to actual implementation) Created: 02/Aug/19 Updated: 24/Jan/20 Resolved: 19/Aug/19 |
|
| Status: | Closed |
| Project: | REST Client |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.0 |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Jaroslav Simak | Assignee: | Andrei Ichimescu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| 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)
|
||||||||||||||||
| Release notes required: |
Yes
|
||||||||||||||||
| Documentation update required: |
Yes
|
||||||||||||||||
| Date of First Response: | |||||||||||||||||
| Epic Link: | Declarative REST clients | ||||||||||||||||
| Sprint: | Declarative REST 4 | ||||||||||||||||
| Story Points: | 8 | ||||||||||||||||
| Description |
RationaleWe've got some issues with modifying requests that are already declared in the configuration. Modifications to original rest calls lead into undesired behavior. Moreover, with introduction of info.magnolia.rest.client.call.AbstractRestCall and it's subclasses back then, i've added unnecessary abstraction layer above JAX-RS abstraction, that makes working with rest client very cumbersome. ProposalDeclare rest calls using definitions, make them utilize JAX-RS API directly, removing implementations of info.magnolia.rest.client.call.AbstractRestCall. Make JAX-RS API available through the info.magnolia.rest.client.RestClient, the info.magnolia.rest.client.RestClient could be a mere provider of configured rest calls with almost no logic inside. Things to considerAs aichimescu pointed out in the discussion, we should make sure, that it is not possible to deduct passwords for 3rd party APIs rest client is connecting to. |
| Comments |
| Comment by Andrei Ichimescu [ 19/Aug/19 ] |
|
The class `info.magnolia.rest.client.call.AbstractRestCall` has been deprecated in favor of `info.magnolia.rest.client.RestCallDefinition`. The `method` field has been added to the `RestCallDefinition` in order to reflect the verb of the REST call and to allow the deprecation of the `AbstractRestCall` implementations. The field `queryParams` has been renamed to `queryParameters`. |