-
Notifications
You must be signed in to change notification settings - Fork 18
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
Support for search operations #16
Comments
Hi, unfortunately I think it's safe to say this isn't supported out of the box. The Thanks for raising this. I will have a think about what supporting this would mean and what it might look like. I'd be interested to see any suggestions you might have for what the client API might be, how you'd map the resources etc. |
So I've had a think, and I reckon this is probably the path of least resistance. We should:
Putting it all together, for the resource http://blah/items/search: {
"_links": {
"findByName": {
"href": "http://blah/items/search/findByName{?name}",
"templated": true
}
}
} you could do: @RemoteResource("/items/search")
interface Search {
@LinkedResource
Item findByName(String name);
} then: Client<Search> search = factory.create(Search.class);
Item item = search.get().findByName("x"); and it feels like this would probably get you what you want. What do you think? I've got a proof of concept working locally that demonstrates this. If it seems like this is what you're after, I'll get it tidied up and merged in. Thanks |
Hey, Greetings, |
@FlorianFusseder - released as 0.4.0. Thanks |
Hi @hdpe I've been trying to get searching working to return a collection of myItems rather than just a single myItem like your example above. At the moment the response resources are returning the appropriate rows however I am running into a NPE because the originalMethod param of the below method is being passed in as null as I believe it is because there is no self reference for the collection of myItems. You would have a lot more knowledge than I do about how things are working here, so was wondering if this was something in the pipeline for development or does it not match your use cases? And what would be involved in implementing this particular feature?
` |
@danapoklepovich sorry about this, and thanks for raising. Your analysis of what's happening here seems completely correct to me. I'll raise this as a new issue. |
@hdpe legend! thanks |
Hi there,
I have been using the project for creating simple clients for our JSON+HAL REST API but I cannot find how to map the search operations. Is it somewhere and I cannot find it or is it not yet supported?
i.e., for something like this:
The text was updated successfully, but these errors were encountered: