Fixing REST APIs
This commit is contained in:
parent
be5ec42502
commit
f0a14878ca
|
@ -24,13 +24,13 @@ import com.webcohesion.enunciate.metadata.rs.StatusCodes;
|
|||
/**
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
@Path(FisheryRESTAPIs.COLLECTION_PATH + "/" )
|
||||
@Path(FisheryRESTAPIs.COLLECTION_PATH)
|
||||
public class FisheryRESTAPIs extends BaseRESTAPIs<Fishery> {
|
||||
|
||||
@PathParam("source")
|
||||
protected String source;
|
||||
|
||||
public static final String COLLECTION_PATH = "fishery/{source}";
|
||||
public static final String COLLECTION_PATH = "fishery";
|
||||
public static final String RECORD_ID_PARAMETER = "fishery_record_id";
|
||||
|
||||
public FisheryRESTAPIs() {
|
||||
|
@ -38,7 +38,7 @@ public class FisheryRESTAPIs extends BaseRESTAPIs<Fishery> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @pathExample /fishery/grsf
|
||||
* @pathExample /fishery
|
||||
*/
|
||||
@GET
|
||||
@Produces(GCatConstants.APPLICATION_JSON_CHARSET_UTF_8)
|
||||
|
@ -73,7 +73,7 @@ public class FisheryRESTAPIs extends BaseRESTAPIs<Fishery> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @pathExample /fishery/grsf
|
||||
* @pathExample /fishery
|
||||
*/
|
||||
@POST
|
||||
@Consumes(GCatConstants.APPLICATION_JSON_CHARSET_UTF_8)
|
||||
|
@ -86,7 +86,7 @@ public class FisheryRESTAPIs extends BaseRESTAPIs<Fishery> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @pathExample /fishery/grsf/bc26e8d0-6ab3-4547-9922-d40407fc5dbd
|
||||
* @pathExample /fishery/bc26e8d0-6ab3-4547-9922-d40407fc5dbd
|
||||
*/
|
||||
@GET
|
||||
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
||||
|
@ -100,7 +100,7 @@ public class FisheryRESTAPIs extends BaseRESTAPIs<Fishery> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @pathExample /fishery/grsf/bc26e8d0-6ab3-4547-9922-d40407fc5dbd
|
||||
* @pathExample /fishery/bc26e8d0-6ab3-4547-9922-d40407fc5dbd
|
||||
*/
|
||||
@PUT
|
||||
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
||||
|
@ -115,7 +115,7 @@ public class FisheryRESTAPIs extends BaseRESTAPIs<Fishery> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @pathExample /fishery/grsf/bc26e8d0-6ab3-4547-9922-d40407fc5dbd
|
||||
* @pathExample /fishery/bc26e8d0-6ab3-4547-9922-d40407fc5dbd
|
||||
*/
|
||||
@PATCH
|
||||
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
||||
|
@ -130,7 +130,7 @@ public class FisheryRESTAPIs extends BaseRESTAPIs<Fishery> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @pathExample /fishery/grsf/bc26e8d0-6ab3-4547-9922-d40407fc5dbd
|
||||
* @pathExample /fishery/bc26e8d0-6ab3-4547-9922-d40407fc5dbd
|
||||
*/
|
||||
@DELETE
|
||||
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
||||
|
@ -145,7 +145,7 @@ public class FisheryRESTAPIs extends BaseRESTAPIs<Fishery> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @pathExample /fishery/grsf/bc26e8d0-6ab3-4547-9922-d40407fc5dbd
|
||||
* @pathExample /fishery/bc26e8d0-6ab3-4547-9922-d40407fc5dbd
|
||||
*/
|
||||
@PURGE
|
||||
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
||||
|
|
|
@ -24,13 +24,13 @@ import com.webcohesion.enunciate.metadata.rs.StatusCodes;
|
|||
/**
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
@Path(StockRESTAPIs.COLLECTION_PATH + "/")
|
||||
@Path(StockRESTAPIs.COLLECTION_PATH)
|
||||
public class StockRESTAPIs extends BaseRESTAPIs<Stock> {
|
||||
|
||||
@PathParam("source")
|
||||
protected String source;
|
||||
|
||||
public static final String COLLECTION_PATH = "stock/{source}";
|
||||
public static final String COLLECTION_PATH = "stock";
|
||||
public static final String RECORD_ID_PARAMETER = "stock_record_id";
|
||||
|
||||
public StockRESTAPIs() {
|
||||
|
@ -38,7 +38,7 @@ public class StockRESTAPIs extends BaseRESTAPIs<Stock> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @pathExample /stock/grsf
|
||||
* @pathExample /stock
|
||||
*/
|
||||
@GET
|
||||
@Produces(GCatConstants.APPLICATION_JSON_CHARSET_UTF_8)
|
||||
|
@ -73,7 +73,7 @@ public class StockRESTAPIs extends BaseRESTAPIs<Stock> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @pathExample /stock/grsf
|
||||
* @pathExample /stock
|
||||
*/
|
||||
@POST
|
||||
@Consumes(GCatConstants.APPLICATION_JSON_CHARSET_UTF_8)
|
||||
|
@ -86,7 +86,7 @@ public class StockRESTAPIs extends BaseRESTAPIs<Stock> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @pathExample /stock/grsf/866a479a-643a-4c21-bbcd-a3a73f28ea50
|
||||
* @pathExample /stock/866a479a-643a-4c21-bbcd-a3a73f28ea50
|
||||
*/
|
||||
@GET
|
||||
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
||||
|
@ -100,7 +100,7 @@ public class StockRESTAPIs extends BaseRESTAPIs<Stock> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @pathExample /stock/grsf/866a479a-643a-4c21-bbcd-a3a73f28ea50
|
||||
* @pathExample /stock/866a479a-643a-4c21-bbcd-a3a73f28ea50
|
||||
*/
|
||||
@PUT
|
||||
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
||||
|
@ -115,7 +115,7 @@ public class StockRESTAPIs extends BaseRESTAPIs<Stock> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @pathExample /stock/grsf/866a479a-643a-4c21-bbcd-a3a73f28ea50
|
||||
* @pathExample /stock/866a479a-643a-4c21-bbcd-a3a73f28ea50
|
||||
*/
|
||||
@PATCH
|
||||
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
||||
|
@ -130,7 +130,7 @@ public class StockRESTAPIs extends BaseRESTAPIs<Stock> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @pathExample /stock/grsf/866a479a-643a-4c21-bbcd-a3a73f28ea50
|
||||
* @pathExample /stock/866a479a-643a-4c21-bbcd-a3a73f28ea50
|
||||
*/
|
||||
@DELETE
|
||||
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
||||
|
@ -145,7 +145,7 @@ public class StockRESTAPIs extends BaseRESTAPIs<Stock> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @pathExample /stock/grsf/866a479a-643a-4c21-bbcd-a3a73f28ea50
|
||||
* @pathExample /stock/866a479a-643a-4c21-bbcd-a3a73f28ea50
|
||||
*/
|
||||
@PURGE
|
||||
@Path("/{" + RECORD_ID_PARAMETER + "}")
|
||||
|
|
|
@ -24,7 +24,7 @@ import com.webcohesion.enunciate.metadata.rs.StatusCodes;
|
|||
/**
|
||||
* @author Luca Frosini (ISTI - CNR)
|
||||
*/
|
||||
@Path(TraceabilityUnitRESTAPIs.COLLECTION_PATH + "/")
|
||||
@Path(TraceabilityUnitRESTAPIs.COLLECTION_PATH)
|
||||
public class TraceabilityUnitRESTAPIs extends BaseRESTAPIs<TraceabilityUnit>{
|
||||
|
||||
public static final String COLLECTION_PATH = "traceability-unit";
|
||||
|
|
Loading…
Reference in New Issue