summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2016-05-05 17:55:32 +0200
committerDavid Lawrence <dkl@mozilla.com>2016-05-05 17:55:32 +0200
commit97cc953d8886f521744656a643dc34a021cfb43c (patch)
treed0ee1b321dccd23ac7095b6be9f26921fc528626
parenta07ff204618e68b7318d4e6598925cf038333cd5 (diff)
downloadbugzilla-97cc953d8886f521744656a643dc34a021cfb43c.tar.gz
bugzilla-97cc953d8886f521744656a643dc34a021cfb43c.tar.xz
Bug 1270289 - REST API /bug/comment/render method is not documented
-rw-r--r--docs/en/rst/api/core/v1/comment.rst48
1 files changed, 48 insertions, 0 deletions
diff --git a/docs/en/rst/api/core/v1/comment.rst b/docs/en/rst/api/core/v1/comment.rst
index 45f48c2ab..765e898c1 100644
--- a/docs/en/rst/api/core/v1/comment.rst
+++ b/docs/en/rst/api/core/v1/comment.rst
@@ -294,3 +294,51 @@ This method can throw all of the errors that :ref:`rest_single_bug` throws, plus
The comment tag provided is shorter than the minimum length.
* 128 (Comment Tag Too Long)
The comment tag provided is longer than the maximum length.
+
+.. _rest_render_comment:
+
+Render Comment
+--------------
+
+Returns the HTML rendering of the provided comment text.
+
+**Request**
+
+.. code-block:: text
+
+ POST /rest/bug/comment/render
+
+Example:
+
+.. code-block:: js
+
+ {
+ "id" : 2345,
+ "text" : "This issue has been fixed in bug 1234."
+ }
+
+============== ====== ================================================
+name type description
+============== ====== ================================================
+**text** string Comment text to render.
+id int The ID of the bug to render the comment against.
+============== ====== =================================================
+
+**Response**
+
+.. code-block:: js
+
+ {
+ "html" : "This issue has been fixed in <a class=\"bz_bug_link
+ bz_status_RESOLVED bz_closed\" title=\"RESOLVED FIXED - some issue that was fixed\" href=\"show_bug.cgi?id=1234\">bug 1234</a>."
+ ]
+
+==== ====== ===================================
+name type description
+==== ====== ===================================
+html string Text containing the HTML rendering.
+==== ====== ===================================
+
+**Errors**
+
+This method can throw all of the errors that :ref:`rest_single_bug` throws.