registration: Allow ObjectFactory spec in extension.json schema
Since 272e941b7f it has been possible for a while now to construct
ContentHandlers using ObjectFactory specifications. However, this
was neither reflected in the JSON Schema of extension.json, nor in
the documentation on mediawiki.org.
See example of this being used in the wild: Ieca72e60d39376.
That patch is currently stuck on extension.json schema validation
test. The ObjectFactory spec itself is fine and works as intended.
Bug: T243560
Change-Id: I5986e19f1780709cf7b3ed2f55d5f46a0a1deeb7
This commit is contained in:
parent
df729bc7ae
commit
f1266d1783
2 changed files with 22 additions and 4 deletions
|
|
@ -697,10 +697,19 @@
|
|||
},
|
||||
"ContentHandlers": {
|
||||
"type": "object",
|
||||
"description": "Mapping of model ID to class name",
|
||||
"description": "Mapping of model ID to class name or an ObjectFactory specification.",
|
||||
"patternProperties": {
|
||||
"^[A-Za-z]+$": {
|
||||
"type": "string"
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Class name of the ContentHandler."
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"description": "ObjectFactory specification of the ContentHandler."
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -728,10 +728,19 @@
|
|||
},
|
||||
"ContentHandlers": {
|
||||
"type": "object",
|
||||
"description": "Mapping of model ID to class name",
|
||||
"description": "Mapping of model ID to class name or an ObjectFactory specification.",
|
||||
"patternProperties": {
|
||||
"^[A-Za-z]+$": {
|
||||
"type": "string"
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Class name of the ContentHandler."
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"description": "ObjectFactory specification of the ContentHandler."
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue