I'm trying to create a GET request, where I have two different requests. Since both resources are related with each other, I'm trying to put them under one 'sub-resource'. The first one is:
@QueryParam("{customerId}")
public List<customerModel> getCustomer(@QueryParam("customerId") Long customerId) {....}
this fetches the customer's name depending on the customerId
@QueryParam("{customerId}/details")
public List<customerDetailModel> getCustomerDetail(@QueryParam("customerId") Long customerId) {....}
this fetches the detailed information of the customer (phone number, address, etc.)
I'm running the first one with the following (works fine) : ......?customerId=7453112
but I can't reach the second request when I'm hitting the following URL: ......?customerId=7453112/details
Any suggestions?