Closed florian-h05 closed 2 weeks ago
As the current answer was undocumented, WDYT about changing the format to JSON and putting the current answer string into a answer key? My plans for the UI need extended core APIs ...
WDYT about changing the format to JSON and putting the current answer string into a answer key?
I wouldn't change it now unless there is a good reason and it is actually used for that. Seems like this API has been around since OH 2.x so changing it will most likely break some user integrations.
My problem is, that I not only need to return an answer from the HLI but also some „action“ data to instruct the UI to show a widget for some Item, but that would also need changes to the HLI interface. Not sure how to handle that.
It might be possible to support both if you add another method with the @Consumes(MediaType.APPLICATION_JSON)
annotation and keep the method having @Consumes(MediaType.TEXT_PLAIN)
. :wink:
Thanks for the hint — I will try that out then, but let’s get this merged first.
Also add annotations for the response.