Last modified: 2014-11-03 14:26:36 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T74297, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 72297 - Maintain order: Have API return and accept lists instead of maps
Maintain order: Have API return and accept lists instead of maps
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
master
All All
: Normal major (vote)
: ---
Assigned To: Wikidata bugs
u=dev c=backend p=0
:
Depends on:
Blocks: 58180
  Show dependency treegraph
 
Reported: 2014-10-21 10:15 UTC by Henning
Modified: 2014-11-03 14:26 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Henning 2014-10-21 10:15:42 UTC
The structures returned by the API are optimized for "raw" API usage (e.g. via Bots). Statements grouped by property as well as qualifiers and reference snaks are returned as maps. While there are awkward "qualifiers-order" and "snaks-order" attributes for qualifiers and reference snaks, there is no way to determine the order of statements via the API. Consequently, no reliable mechanism to manually order statements can be implemented.
Instead of having to apply complex logic evaluating special attributes like "qualifiers-order" and "snaks-order", there should be a way to retrieve natively ordered structures from the API.
The proposal is to provide a flag that, when submitted to API modules, will make lists instead of maps getting returned.
Comment 1 Adrian Lang 2014-10-21 13:56:58 UTC
Currently we get our data from wbEntity, too, so that would have to have this grouping, too.
Comment 2 Henning 2014-10-24 10:37:30 UTC
Of course, the front-end needs to be able to submit order changes to the API as well. At the moment, this can be done by submitting a plain "index" parameter which, probably, is not the most robust solution.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links