-
Notifications
You must be signed in to change notification settings - Fork 47
fix: use mapper embedding date-time in LocalStatusListCredentialPublisherExtension #711
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
fix: use mapper embedding date-time in LocalStatusListCredentialPublisherExtension #711
Conversation
LocalStatusListCredentialPublisherExtension| 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())); |
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 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);
//...
}c4bab65 to
eed3238
Compare
| webServer.registerResource(STATUS_LIST, new StatusListCredentialController(store, context.getMonitor(), new ObjectMapper())); | ||
| webServer.registerResource(STATUS_LIST, new StatusListCredentialController(store, monitor, objectMapper)); |
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.
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
eed3238 to
100154a
Compare
…ialPublisherExtension
100154a to
db246bd
Compare
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.