I am using Kathatrsis for my REST API. I am also new to the JSONApi spec. I for the life of me cant figure out the url pattern to call the @JsonApiFindAllWithIds
method.
For example, say it is annotated as:
@JsonApiFindAllWithIds
public Iterable<ThriftType> findAll(Iterable<String> iterable, QueryParams queryParams) {
And if I call the URL (my resource is called test):
http://localhost:8080/test/1?filter[test][otherId][EQ]=9
I would expect it to hit that method, with an iterable list containing 1
and a query param object containing my filter.
However, it calls my @JsonApiFindOne
method described as:
@JsonApiFindOne
public ThriftType findOne(String id) {
Can you tell me the proper url format to hit my @JsonApiFindAllWithIds
method?
JsonAliFindAllWithIds is for scenarios where there are more than one id for which value needs to be fetched. For eg
http://localhost:8080/test/1,2
Would call findallwithids method whereas providing a single Id would call findone method. Hope it helps