daniel added a comment. |
In T174032#3990355, @Anomie wrote:For ApiComparePages, we need to first figure out T174036: Allow the diffs to show multiple slots [MCR].
Diffs will be slot-by-slot. For T174036 we need to figure out how in what order they should be shown, with what headings, where the code for composing the HTML should live, etc. None of that matters for API output. So I'd think this can be handled just like the ApiQueryRevisionsBase case: add a slots parameter, and return diffs for multiple/all slots if requested, be introducing another level in the result structure.
For ApiParse, we need to first figure out T174035: Allow the view action to show multiple slots [MCR].
ApiParse has several modes, and MCR only matters when the page parameter is specified. In that case, it should be possible to again handle this just like the ApiQueryRevisionsBase case: add a slots parameter, and return output for multiple/all slots if requested, be introducing another level in the result structure.
That leaves the question what exactly should happen if no slots parameter was specified. Should the result be a "combined" output, or just the main slot? In my mind, the result of ApiParse is a representation of a ParserOutput object; and with no slots parameter, it should be the ParserOutput that we would put into the parser cache - that is, whatever PreparedEdit::getCombinedParserOutput() returns. For now, that is just the main slot, but we are free to change this.
Cc: Aklapper, daniel, Lahi, PDrouin-WMF, Gq86, E1presidente, Ramsey-WMF, Cparle, SandraF_WMF, GoranSMilovanovic, QZanden, Tramullas, Acer, LawExplorer, Susannaanas, Aschroet, Jane023, Wikidata-bugs, PKM, Base, matthiasmullie, aude, Ricordisamoa, Lydia_Pintscher, Fabrice_Florin, Raymond, Anomie, Steinsplitter, Mbch331
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs