Page MenuHomePhabricator

Autogenerated XML schema
Closed, DeclinedPublic


There should be an API module that autogenerates an XML schema (kind of like a blueprint for the API's output, specs @ ), much like the current API help is autogenerated.

Version: 1.13.x
Severity: enhancement



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:10 PM
bzimport set Reference to bz14025.
bzimport added a subscriber: Unknown Object (MLST).

(In reply to comment #1)

I'm on it

I'll re-assign to you then.

Don't presume you got anywhere with this VVV?

Since gerrit 6394 the api modules have a method getResultProperties, which is also outputted with action=paraminfo. So the information about the output exist and maybe can be processed to xml/xsd

This report has been in ASSIGNED status for more than one year and you are set as its assignee. In case that you are not actively working on a fix, please reset the bug status to NEW/UNCONFIRMED.
In case you do not plan to work on a fix in the near future: Please also edit the "Assigned To" field by clicking "Reset Assignee to default", in order to not prevent potential contributors from working on a fix. Thanks for your help!

I'm proposing to WONTFIX this bug: situation has changed since then, XML requests are less than 10% overall, and all the API developers hate XML with passion. We should be working towards killing this format, not adding more enterprisey cruft to it.

No objections voiced --> executing.

Seppl2013 added a subscriber: Seppl2013.

@MaxSem - i had to lookup "cruft" - the meaning seams to be unneccessary garbage. Thank you for having added this to my english vocabulary.

at I am trying to generate just another Mediawiki Java API library. The approach is using JAXB which would work nicely if there was a XSD Schema. This would also have the advantage that the XML would eventually get a clean(er) structure e.g. not using the same node name for different concepts.. JAXB will automatically also create JSON from the Schema - so the question JSON/XML is not so much about the format itself but about the definitions behind it.

Currently as a workaround I am using some xml results to generate xsd from the xml. This does not give the proper result needed and is just a semi-automatic approach. I'd appreciate if this bug report would be reopened to make an XSD schema available that can be used for JAXB generation.

TTO lowered the priority of this task from Medium to Lowest.Jan 2 2015, 1:34 AM
TTO added a subscriber: TTO.

Marking as "needs volunteer". Note that the XML format is headed for eventual death (or at least deprecation)

MaxSem claimed this task.

Sorry, it's just not gonna happen even if we had a patch. That patch will not be accepted.

Maybe we need another Bugreport / change request then. I there will be no XML/XSD it would still be great and useful to have something like a "Schema" as a basis. Obviously the generator that creates the help page could also generate a computer readable api description. So far I was able to create some 16 Java classes by reverse engineering the xml with a semi-automatic process:

It would be great to check the results against the "official" api. I'd like to make that part of the build process of Mediawiki-Japi

Obviously the generator that creates the help page could also generate a computer readable api description.

See action=paraminfo.