Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F6073650
TransformWikitextToLintHandler.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
TransformWikitextToLintHandler.php
View Options
<?php
namespace
MediaWiki\Rest\Handler
;
/**
* Handler for transforming content given in the request.
*
* This class primarily deals with parameter validation and OpenAPI spec generation.
* Everything else is handled by the base class.
*
* TODO: reconsider the ParsoidHandler => TransformHandler hierarchy. Consider consolidating
* classes and moving more validation into functions like getParamSettings(),
* getBodyParamSettings(), etc.
*
* @unstable Pending consolidation of the Parsoid extension with core code.
*/
class
TransformWikitextToLintHandler
extends
TransformHandler
{
/** @inheritDoc */
public
function
getParamSettings
()
{
return
[];
}
/**
* The parent TransformHandler class accepts a variety of body parameters in different
* situations, some of which can accept values in multiple types and therefore cannot
* be described in getBodyParamSettings(). See TransformHandler::execute(), and notice
* that both "wikitext" and "html" can be either a string or an object.
*
* We therefore define a request body schema directly rather than the more common approach of
* generating it from definitions in getBodyParamSettings().
*/
protected
function
getRequestBodySchema
(
string
$mediaType
):
array
{
return
[
'oneOf'
=>
[
[
'type'
=>
'object'
,
'properties'
=>
[
'wikitext'
=>
[
'type'
=>
'string'
,
]
]
],
[
'type'
=>
'object'
,
'properties'
=>
[
'wikitext'
=>
[
'type'
=>
'object'
,
'properties'
=>
[
'headers'
=>
[
'type'
=>
'object'
,
],
'body'
=>
[
'type'
=>
'string'
,
]
]
]
]
]
],
];
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Oct 5 2026, 08:10 (6 w, 23 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
20/7b/016ccc9897aac78ce25513f70932
Default Alt Text
TransformWikitextToLintHandler.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment