ehrbase/openEHR_SDK

Deserialization problem with TemplateMetaDataDto.createdOn

Opened this issue · 0 comments

Before reporting an issue

  • I have searched existing issues
  • I have reproduced the issue with the latest release

Environment information

openEHR SDK version 2.17

Steps to reproduce

In the method TemplateEndpoint.findAllTemplates() the SDK tries to parse created_timestamp with a certain pattern ("yyyy-MM-dd'T'HH:mm:ss.SSSXXX"). When we tried to use it with a Better openEHR server, this causes an exception:

org.ehrbase.client.exception.ClientException: Cannot deserialize value of type `java.time.OffsetDateTime` from String "2023-10-19T09:57:27.31Z": Failed to deserialize java.time.OffsetDateTime: (java.time.format.DateTimeParseException) Text '2023-10-19T09:57:27.31Z' could not be parsed at index 20

In the the openEHR specification this field is defined only as a string, but not as a specific date format.

Expected behavior

We would expect that any string is accepted here, so that the SDK is compatible with other openEHR providers.

Actual result

Further information

No response