-
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: introduces dymanic feature binding in WebService #4559
feat: introduces dymanic feature binding in WebService #4559
Conversation
0533195
to
aca1429
Compare
997826a
to
5ae3845
Compare
5ae3845
to
01a82b3
Compare
transformerRegistry.register(new JsonObjectFromProtocolVersionsTransformer()); | ||
transformerRegistry.register(new JsonObjectFromVersionsError(Json.createBuilderFactory(Map.of()))); | ||
|
||
webService.registerResource(ApiContext.PROTOCOL, new DspVersionApiController(requestHandler, service)); | ||
webService.registerDynamicResource(ApiContext.PROTOCOL, DspVersionApiController.class, new JerseyJsonLdInterceptor(jsonLd, jsonLdMapper, DSP_SCOPE_V_08)); |
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.
version endpoint has been introduced in version 2024/1 so it should have the related namespace (as pointed from the documentation: https://docs.internationaldataspaces.org/ids-knowledgebase/dataspace-protocol/common-functionalities/common.protocol)
not sure on what should happen with the next version tho...
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.
The version endpoint actually cannot have a version and it should change in the future i think.
but we currently use 0.8 namespace for terms , that's why I binded it to 0.8
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.
If we are ok to do the "breaking change" we can do it once we introduce 2024/1 as namespace
What this PR changes/adds
Introduces dymanic feature binding in WebService for binding a
JerseyJsonLdInterceptor
for each controller in order to use the right JSON-LD scope.Additionally the
JsonLdRemoteMessageSerializerImpl
uses the right scope based on the protocol version.Why it does that
Briefly state why the change was necessary.
Further notes
List other areas of code that have changed but are not necessarily linked to the main feature. This could be method
signature changes, package declarations, bugs that were encountered and were fixed inline, etc.
Linked Issue(s)
Closes #4558
Please be sure to take a look at the contributing guidelines and our etiquette for pull requests.