-
-
Notifications
You must be signed in to change notification settings - Fork 428
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
[rest] VoiceResource: Return answer from /interpreters endpoint #4434
Conversation
… annotations for answer Signed-off-by: Florian Hotze <[email protected]>
As the current answer was undocumented, 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. |
String answer = hli.interpret(locale, text); | ||
return Response.ok(answer, MediaType.TEXT_PLAIN).build(); |
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.
Did it always return null?
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.
What to you mean?
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 |
Thanks for the hint — I will try that out then, but let’s get this merged first. |
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.
Thanks!
Also add annotations for the response.