@Override
protected void describePost(MethodInfo info) {
info.setIdentifier("create_item");
info.setDocumentation("To create an item.");
RepresentationInfo repInfo = new RepresentationInfo(
MediaType.APPLICATION_WWW_FORM);
ParameterInfo param = new ParameterInfo("name", ParameterStyle.PLAIN,
"Name of the item");
repInfo.getParameters().add(param);
param = new ParameterInfo("description", ParameterStyle.PLAIN,
"Description of the item");
repInfo.getParameters().add(param);
repInfo.setDocumentation("Web form.");
info.getRequest().getRepresentations().add(repInfo);
ResponseInfo response = new ResponseInfo();
response.getStatuses().add(Status.SUCCESS_CREATED);
info.getResponses().add(response);
response = new ResponseInfo();
response.getStatuses().add(Status.CLIENT_ERROR_NOT_FOUND);
info.getResponses().add(response);
repInfo = new RepresentationInfo(MediaType.TEXT_HTML);
repInfo.setIdentifier("itemError");
response.getRepresentations().add(repInfo);
}