29 if ( $contentType !==
'application/json' ) {
32 [
'content_type' => $contentType ]
38 self::PARAM_SOURCE =>
'body',
39 ParamValidator::PARAM_TYPE =>
'string',
40 ParamValidator::PARAM_REQUIRED =>
true,
43 self::PARAM_SOURCE =>
'body',
44 ParamValidator::PARAM_TYPE =>
'string',
45 ParamValidator::PARAM_REQUIRED =>
true,
48 self::PARAM_SOURCE =>
'body',
49 ParamValidator::PARAM_TYPE =>
'string',
50 ParamValidator::PARAM_REQUIRED =>
true,
53 self::PARAM_SOURCE =>
'body',
54 ParamValidator::PARAM_TYPE =>
'string',
55 ParamValidator::PARAM_REQUIRED =>
false,
58 self::PARAM_SOURCE =>
'body',
59 ParamValidator::PARAM_TYPE =>
'string',
60 ParamValidator::PARAM_REQUIRED =>
false,
61 ParamValidator::PARAM_DEFAULT =>
'',
74 $contentmodel = $body[
'content_model'] ?:
null;
76 if ( $contentmodel !==
null && !$this->contentHandlerFactory->isDefinedModel( $contentmodel ) ) {
78 new MessageValue(
'rest-bad-content-model', [ $body[
'content_model'] ] ), 400
87 'text' => $body[
'source'],
88 'summary' => $body[
'comment'],
93 if ( $contentmodel !==
null ) {
94 $params[
'contentmodel'] = $contentmodel;
102 array $actionModuleResult,
105 parent::mapActionModuleResponse(
106 $actionModuleResponse,
114 $response->
setHeader(
'Location', $url );
Do-nothing body validator.
Allow programs to request this object from WebRequest::response() and handle all outputting (or lack ...