-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: dataspace protocol negotiation dispatcher #2780
feat: dataspace protocol negotiation dispatcher #2780
Conversation
36e2fb1
to
deafc6f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't some of the boilerplate code around creating a JSON structure, HTTP request and dispatching it be pulled up into an abstract class?
Agree. When you are okay with it, I would open an issue for this refactoring. I guess we could also merge this with the transformer delegates and add the abstract class to the |
I think we should refactor this PR to include the abstract class because it will simplify the code, which contains a lot of duplication. Later we can move the abstract class out in a subsequent PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't some of the boilerplate code around creating a JSON structure, HTTP request and dispatching it be pulled up into an abstract class?
I would prefer a collaborator, its behavior is pretty clear, serialize a RemoteMessage
, it could be an interface called RemoteMessageSerializer
with the JsonLdRemoteMessageSerializer
implementation.
I agree that this should be done in this PR, it won't take much and it will simplify tests a lot
deafc6f
to
753bf09
Compare
PR is rebased. @ronjaquensel will take care of refactoring. The refactored structure will then also be applied to #2760. |
@ndr-brt @jimmarino I refactored the delegates as follows:
|
e20e5b4
to
5ba30e2
Compare
var requestBody = RequestBody.create(body, MediaType.get(APPLICATION_JSON)); | ||
|
||
return new Request.Builder() | ||
.url(message.getCallbackAddress() + path) |
Check failure
Code scanning / CodeQL
Server-side request forgery
5ba30e2
to
cb4648d
Compare
Codecov ReportPatch coverage:
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #2780 +/- ##
==========================================
+ Coverage 65.50% 65.99% +0.48%
==========================================
Files 978 979 +1
Lines 19896 19806 -90
Branches 1177 1163 -14
==========================================
+ Hits 13032 13070 +38
+ Misses 6398 6271 -127
+ Partials 466 465 -1
... and 5 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
fe37043
to
4408ffa
Compare
--------- Co-authored-by: Ronja Quensel <[email protected]>
What this PR changes/adds
Adds delegates for dsp negotiation messages.
Why it does that
Implement dataspace protocol
Further notes
Adds dependencies:
:data-protocols:dsp:dsp-negotiation:dsp-negotiation-spi
:data-protocols:dsp:dsp-negotiation:dsp-negotiation-transform
(classes are contributed with feat: dataspace protocol negotiation transformer #2771)Linked Issue(s)
Relates #2474
Checklist
no-changelog
)