From 1b86093b701befd251f504af4dc0efbf370ab310 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Wed, 10 Jun 2020 18:08:23 +0200 Subject: [PATCH] api: Specify PARAM_TYPE => 'text' for multi-line text parameters This allows Special:ApiSandbox to display multi-line text boxes for them, which makes testing the API easier. Change-Id: I10541a8e9033d81740033da80d842f58d1d3e0de --- includes/ApiVisualEditor.php | 5 ++++- includes/ApiVisualEditorEdit.php | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/includes/ApiVisualEditor.php b/includes/ApiVisualEditor.php index f7de90b76c..2e52147011 100644 --- a/includes/ApiVisualEditor.php +++ b/includes/ApiVisualEditor.php @@ -667,7 +667,10 @@ class ApiVisualEditor extends ApiBase { 'parsedoc', ], ], - 'wikitext' => null, + 'wikitext' => [ + ApiBase::PARAM_TYPE => 'text', + ApiBase::PARAM_DFLT => null, + ], 'section' => null, 'stash' => null, 'oldid' => null, diff --git a/includes/ApiVisualEditorEdit.php b/includes/ApiVisualEditorEdit.php index 9950bf032a..698499a597 100644 --- a/includes/ApiVisualEditorEdit.php +++ b/includes/ApiVisualEditorEdit.php @@ -478,7 +478,10 @@ class ApiVisualEditorEdit extends ApiBase { 'token' => [ ApiBase::PARAM_REQUIRED => true, ], - 'wikitext' => null, + 'wikitext' => [ + ApiBase::PARAM_TYPE => 'text', + ApiBase::PARAM_DFLT => null, + ], 'section' => null, 'sectiontitle' => null, 'basetimestamp' => null, @@ -486,7 +489,10 @@ class ApiVisualEditorEdit extends ApiBase { 'oldid' => null, 'minor' => null, 'watchlist' => null, - 'html' => null, + 'html' => [ + ApiBase::PARAM_TYPE => 'text', + ApiBase::PARAM_DFLT => null, + ], 'etag' => null, 'summary' => null, 'captchaid' => null,