summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-rest/archiva-rest-services
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2014-05-21 15:19:52 +1000
committerOlivier Lamy <olamy@apache.org>2014-05-21 15:19:52 +1000
commit0c689f9f6f76cbef97095f743b36c92fa1288897 (patch)
tree8847101b53721c6e2e1a0f4fad2fd25f4a3e93bf /archiva-modules/archiva-web/archiva-rest/archiva-rest-services
parentd485a996378fcaf5b46d78da348c2b20793ed360 (diff)
downloadarchiva-0c689f9f6f76cbef97095f743b36c92fa1288897.tar.gz
archiva-0c689f9f6f76cbef97095f743b36c92fa1288897.zip
version is mandatory too
Diffstat (limited to 'archiva-modules/archiva-web/archiva-rest/archiva-rest-services')
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSearchService.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSearchService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSearchService.java
index b923e37c7..62d0df2d3 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSearchService.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSearchService.java
@@ -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()