diff options
Diffstat (limited to 'includes/Rest/Handler')
-rw-r--r-- | includes/Rest/Handler/CreationHandler.php | 9 | ||||
-rw-r--r-- | includes/Rest/Handler/UpdateHandler.php | 5 |
2 files changed, 9 insertions, 5 deletions
diff --git a/includes/Rest/Handler/CreationHandler.php b/includes/Rest/Handler/CreationHandler.php index 5cbc193892a6..5912c0a74784 100644 --- a/includes/Rest/Handler/CreationHandler.php +++ b/includes/Rest/Handler/CreationHandler.php @@ -3,6 +3,7 @@ namespace MediaWiki\Rest\Handler; use MediaWiki\Request\WebResponse; +use MediaWiki\Rest\Handler; use MediaWiki\Rest\LocalizedHttpException; use MediaWiki\Rest\Response; use Wikimedia\Message\MessageValue; @@ -32,25 +33,25 @@ class CreationHandler extends EditHandler { self::PARAM_SOURCE => 'body', ParamValidator::PARAM_TYPE => 'string', ParamValidator::PARAM_REQUIRED => true, - self::PARAM_DESCRIPTION => 'The intended content of the page', + Handler::PARAM_DESCRIPTION => new MessageValue( 'rest-param-desc-source' ) ], 'title' => [ self::PARAM_SOURCE => 'body', ParamValidator::PARAM_TYPE => 'string', ParamValidator::PARAM_REQUIRED => true, - self::PARAM_DESCRIPTION => 'The title of the page to create', + Handler::PARAM_DESCRIPTION => new MessageValue( 'rest-param-desc-create-title' ) ], 'comment' => [ self::PARAM_SOURCE => 'body', ParamValidator::PARAM_TYPE => 'string', ParamValidator::PARAM_REQUIRED => true, - self::PARAM_DESCRIPTION => 'A comment describing the reason for creating the page', + Handler::PARAM_DESCRIPTION => new MessageValue( 'rest-param-desc-comment' ) ], 'content_model' => [ self::PARAM_SOURCE => 'body', ParamValidator::PARAM_TYPE => 'string', ParamValidator::PARAM_REQUIRED => false, - self::PARAM_DESCRIPTION => 'The content model to use to interpret the source', + Handler::PARAM_DESCRIPTION => new MessageValue( 'rest-param-desc-contentmodel' ) ], ] + $this->getTokenParamDefinition(); diff --git a/includes/Rest/Handler/UpdateHandler.php b/includes/Rest/Handler/UpdateHandler.php index 2fbc089237eb..c6fc9b67fde4 100644 --- a/includes/Rest/Handler/UpdateHandler.php +++ b/includes/Rest/Handler/UpdateHandler.php @@ -61,17 +61,19 @@ class UpdateHandler extends EditHandler { self::PARAM_SOURCE => 'body', ParamValidator::PARAM_TYPE => 'string', ParamValidator::PARAM_REQUIRED => true, - Handler::PARAM_DESCRIPTION => new MessageValue( 'rest-param-desc-update-source' ) + Handler::PARAM_DESCRIPTION => new MessageValue( 'rest-param-desc-source' ) ], 'comment' => [ self::PARAM_SOURCE => 'body', ParamValidator::PARAM_TYPE => 'string', ParamValidator::PARAM_REQUIRED => true, + Handler::PARAM_DESCRIPTION => new MessageValue( 'rest-param-desc-comment' ) ], 'content_model' => [ self::PARAM_SOURCE => 'body', ParamValidator::PARAM_TYPE => 'string', ParamValidator::PARAM_REQUIRED => false, + Handler::PARAM_DESCRIPTION => new MessageValue( 'rest-param-desc-contentmodel' ) ], 'latest' => [ self::PARAM_SOURCE => 'body', @@ -81,6 +83,7 @@ class UpdateHandler extends EditHandler { [ 'id' => 'integer' ], [ 'timestamp' => 'string' ], // from GET response, will be ignored ), + Handler::PARAM_DESCRIPTION => new MessageValue( 'rest-param-desc-update-latest' ) ], ] + $this->getTokenParamDefinition(); } |