Please do a quick search on GitHub issues first, there might be already a duplicate issue for the one you are about to create. If the bug is trivial, just go ahead and create the issue. Otherwise, please take a few moments and fill in the following sections:
Bug description
I tried to define a function call in spring ai as below
@Bean
@Description("return list of Vets, include their specialist")
public Function<Void, Collection<Vet>> queryVets() {
return request -> {
return vetRepository.findAll();
};
}
The input parameter is Void as the function has no input parameter. But I got the error
com.azure.core.exception.HttpResponseException: Status code 400, "{ "error": { "message": "Invalid schema for function 'queryVets': In context=(), object schema missing properties", "type": "invalid_request_error", "param": null, "code": null } } "
Expected behavior If the function input parameter is VOID, there should no such check
Minimal Complete Reproducible example Please provide a failing test or a minimal complete verifiable example that reproduces the issue. Bug reports that are reproducible will take priority in resolution over reports that are not reproducible.
Comment From: clivelewis
I'm trying to achieve the same behaviour. Any help would be appreciated
Comment From: markpollack
We are looking into this issue now. Stay tuned.
Comment From: smtlmoel
I have the same Problem here. trigger-functions with no parameters get the described error from the model above. When will 1.0.0.M2 be released @markpollack?
Comment From: tzolov
Resoled by 432954dad7f7c3a33117848a4259bc7076865c5f