In T94890 it's been decided to change the /transform/sections/to/wikitext format to accept an object in the following form:
{
"mwAA": [ { html: "<h1>bla bla bla</h1>" }, { "id": "mwAb" }, { "html": "<h1>bla</h1>", "data-mw": "asdas" } ]
}So we might want to alter the section retrieval API to emit something similar. Here's the list of changes I propose:
- Make section retrieval emit something like
{
"mwAA": { html: "<h1>bla bla bla</h1>" }
}This format is in line with section transformation format, and also when we separate data-mw it will allow us to build a /bundle endpoint, that would emit both html and data-mw
- Potentially make section retrieval take an array instead of a comma-separated list.
- Potentially introduce a new hierarchy for sections to increase discoverability.
/page/sections/html/{title}?sections=mwAA§ions=mwAB
/page/sections/data-mw/{title}?sections=mwAA§ions=mwAB
/page/sections/bundle/{title}?sections=mwAA§ions=mwAB
This task is not a call for action, but a question whether you think it worths doing that or not. @GWicke @mobrovac @Eevans what's your thoughts?