package io.github.rebelizant.jaxrsexample.rest;

import io.github.rebelizant.jaxrsexample.domain.Customer;

import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import java.util.List;

/**
 * @author rebelizant
 *         Created on 18.04.16
 */
@Path("/customers")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public interface CustomerResource {

    @POST
    void createCustomer(Customer customer);

    @GET
    List<Customer> getCustomers(@QueryParam("start") int start, @QueryParam("size") int size);

    @PUT
    @Path("/{id}")
    void updateCustomer(@PathParam("id") Long id, Customer customer);

    @GET
    @Path("/{id}")
    Customer getCustomer(@PathParam("id") Long id);

    @DELETE
    @Path("/{id}")
    void deleteCustomer(@PathParam("id") Long id);

    @Path("{customerId}/orders")
    OrderSubResource getOrderSubResource();

}

@@ -552,36 +552,42 @@
 %0A    @Path(%22/%7Bid
+: %5C%5Cd+
 %7D%22)%0A
-
     void updateC
@@ -657,32 +657,38 @@
 %0A    @Path(%22/%7Bid
+: %5C%5Cd+
 %7D%22)%0A    Customer
@@ -755,16 +755,22 @@
 th(%22/%7Bid
+: %5C%5Cd+
 %7D%22)%0A    
@@ -813,24 +813,24 @@
  Long id);%0A%0A
-
     @Path(%22%7B
@@ -839,16 +839,22 @@
 stomerId
+: %5C%5Cd+
 %7D/orders

add regexp matcher for customer id