version is mandatory too

This commit is contained in:
Olivier Lamy 2014-05-21 15:19:52 +10:00
parent d485a99637
commit 0c689f9f6f
1 changed files with 24 additions and 0 deletions

View File

@ -245,6 +245,30 @@ public class DefaultSearchService
} ).build();
}
if ( StringUtils.isEmpty( version ) )
{
return Response.status( new Response.StatusType()
{
@Override
public int getStatusCode()
{
return Response.Status.BAD_REQUEST.getStatusCode();
}
@Override
public Response.Status.Family getFamily()
{
return Response.Status.BAD_REQUEST.getFamily();
}
@Override
public String getReasonPhrase()
{
return "version mandatory";
}
} ).build();
}
if ( StringUtils.isEmpty( artifactId ) )
{
return Response.status( new Response.StatusType()