TNO / knowledge-engine

Improves interoperability between systems (i.e. devices, platforms, apps, databases) by exchanging data based on their semantics
https://knowledge-engine.eu
Apache License 2.0
33 stars 4 forks source link

KnowledgeInteractionId not set correctly in KnowledgeEngineRestApiClient #379

Closed Sophietje closed 9 months ago

Sophietje commented 2 years ago

In GitLab by @david.heck.iee.fraunhofer.de on Apr 20, 2022, 14:12

The following line has an error.

https://gitlab.inesctec.pt/interconnect/knowledge-engine/-/blob/master/smart-connector-rest-server/src/main/java/eu/knowledge/engine/rest/api/client_example/KnowledgeEngineRestApiClient.java#L166

kii.setKnowledgeInteractionId(response.body().string());

setKnowledgeInteractionId needs the URI as parameter. However response.body().string() gives the URI inside of a json.

Something like kii.setKnowledgeInteractionId(response.body().string().split("\"")[3]); works, though I know its ugly.

Sophietje commented 2 years ago

In GitLab by @han.kruiger.tno.nl on Apr 28, 2022, 07:10

Hi David, thanks for raising this. It is indeed a bug in the example client, caused by a breaking change that we made to the API.

Sophietje commented 2 years ago

In GitLab by @han.kruiger.tno.nl on Jun 10, 2022, 14:37

created branch 365-knowledgeinteractionid-not-set-correctly-in-knowledgeenginerestapiclient to address this issue

Sophietje commented 2 years ago

In GitLab by @han.kruiger.tno.nl on Jun 10, 2022, 14:54

This should be fixed in master once the pipeline succeeds and the merge is triggered! :white_check_mark:

Sophietje commented 2 years ago

In GitLab by @han.kruiger.tno.nl on Jun 10, 2022, 15:00

mentioned in commit 4a11ad72d9a4343f1356ab21de2053842ef5f6a0