Skip to content

Conversation

@bscholtes1A
Copy link
Contributor

What this PR changes/adds

Use mapper including date/time modules in LocalStatusListCredentialPublisherExtension.

Why it does that

Fix error during mapping to VC.

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.

Who will sponsor this feature?

@bscholtes1A

Linked Issue(s)

Closes #710

Please be sure to take a look at the contributing guidelines and our etiquette for pull requests.

@bscholtes1A bscholtes1A added bug Something isn't working api labels Apr 16, 2025
@bscholtes1A bscholtes1A changed the title fix: use mapper embedding date/time modules in LocalStatusListCredentialPublisherExtension fix: use mapper embedding date-time modules in LocalStatusListCredentialPublisherExtension Apr 16, 2025
@bscholtes1A bscholtes1A changed the title fix: use mapper embedding date-time modules in LocalStatusListCredentialPublisherExtension fix: use mapper embedding date-time in LocalStatusListCredentialPublisherExtension Apr 17, 2025
@bscholtes1A bscholtes1A requested a review from wolf4ood April 17, 2025 07:42
portMappingRegistry.register(new PortMapping(STATUS_LIST, config.port(), config.path()));

webServer.registerResource(STATUS_LIST, new StatusListCredentialController(store, context.getMonitor(), new ObjectMapper()));
webServer.registerResource(STATUS_LIST, new StatusListCredentialController(store, monitor, JacksonJsonLd.createObjectMapper()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the object mapper should not be "hard-coded", better to use:

@Inject 
private TypeManager typeManager;

public void initialize(ServiceExtensionContext context){
  //...
  var objectMapper = typeManager.getMapper(JSON_LD);
  //...
}

@bscholtes1A bscholtes1A force-pushed the fix/710_mapper_datetime_module_localstatuscredentialpublisher branch from c4bab65 to eed3238 Compare April 17, 2025 12:05
Comment on lines 66 to 78
webServer.registerResource(STATUS_LIST, new StatusListCredentialController(store, context.getMonitor(), new ObjectMapper()));
webServer.registerResource(STATUS_LIST, new StatusListCredentialController(store, monitor, objectMapper));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to pass or a Supplier<ObjectMapper> or the type manager and the and the JSON_LD key to the StatusListCredentialController. We had strange behavior in the past where the JSON_LD was not registered yet in the TypeManager and the get returned the default one, which probably it's not the expected one

@bscholtes1A bscholtes1A force-pushed the fix/710_mapper_datetime_module_localstatuscredentialpublisher branch from eed3238 to 100154a Compare April 22, 2025 13:05
@bscholtes1A bscholtes1A requested a review from wolf4ood April 22, 2025 13:31
@bscholtes1A bscholtes1A force-pushed the fix/710_mapper_datetime_module_localstatuscredentialpublisher branch from 100154a to db246bd Compare April 22, 2025 15:18
@bscholtes1A bscholtes1A merged commit 9801676 into eclipse-edc:main Apr 23, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

use ObjectMapper embedding date/time modules in LocalStatusListCredentialPublisherExtension

3 participants