summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/Constants.pm5
-rw-r--r--Bugzilla/WebService/Server/REST.pm1
2 files changed, 6 insertions, 0 deletions
diff --git a/Bugzilla/Constants.pm b/Bugzilla/Constants.pm
index 74062df63..d22eed063 100644
--- a/Bugzilla/Constants.pm
+++ b/Bugzilla/Constants.pm
@@ -18,6 +18,7 @@ use Memoize;
@Bugzilla::Constants::EXPORT = qw(
BUGZILLA_VERSION
+ REST_DOC
REMOTE_FILE
LOCAL_FILE
@@ -198,6 +199,10 @@ use Memoize;
# Bugzilla version
use constant BUGZILLA_VERSION => "4.5.4+";
+# A base link to the current REST Documentation. We place it here
+# as it will need to be updated to whatever the current release is.
+use constant REST_DOC => "http://www.bugzilla.org/docs/tip/en/html/api/";
+
# Location of the remote and local XML files to track new releases.
use constant REMOTE_FILE => 'http://updates.bugzilla.org/bugzilla-update.xml';
use constant LOCAL_FILE => 'bugzilla-update.xml'; # Relative to datadir.
diff --git a/Bugzilla/WebService/Server/REST.pm b/Bugzilla/WebService/Server/REST.pm
index bdc8365fc..2f1b80c45 100644
--- a/Bugzilla/WebService/Server/REST.pm
+++ b/Bugzilla/WebService/Server/REST.pm
@@ -120,6 +120,7 @@ sub response {
if (exists $json_data->{error}) {
$result = $json_data->{error};
$result->{error} = $self->type('boolean', 1);
+ $result->{documentation} = REST_DOC;
delete $result->{'name'}; # Remove JSONRPCError
}
elsif (exists $json_data->{result}) {