MediaWiki master
|
Inherits MediaWiki\Rest\Validator\BodyValidator.
Public Member Functions | ||||||
__construct (array $bodyParamSettings) | ||||||
getOpenAPISpec () | ||||||
Returns an OpenAPI Schema Object specification structure as an associative array. | ||||||
validateBody (RequestInterface $request) | ||||||
Validate the body of a request.This may return a data structure representing the parsed body. When used in the context of Handler::validateParams(), the returned value will be available to the handler via Handler::getValidatedBody().
| ||||||
Definition at line 16 of file JsonBodyValidator.php.
MediaWiki\Rest\Validator\JsonBodyValidator::__construct | ( | array | $bodyParamSettings | ) |
array[] | $bodyParamSettings |
Definition at line 27 of file JsonBodyValidator.php.
References wfDeprecatedMsg().
MediaWiki\Rest\Validator\JsonBodyValidator::getOpenAPISpec | ( | ) |
Returns an OpenAPI Schema Object specification structure as an associative array.
This will contain information about the supported parameters.
Definition at line 93 of file JsonBodyValidator.php.
References MediaWiki\Rest\Validator\Validator\getParameterSpec().
MediaWiki\Rest\Validator\JsonBodyValidator::validateBody | ( | RequestInterface | $request | ) |
Validate the body of a request.This may return a data structure representing the parsed body. When used in the context of Handler::validateParams(), the returned value will be available to the handler via Handler::getValidatedBody().
RequestInterface | $request |
HttpException | on validation failure |
Implements MediaWiki\Rest\Validator\BodyValidator.
Definition at line 39 of file JsonBodyValidator.php.
References MediaWiki\Rest\RequestInterface\getBody().