Page MenuHomePhabricator

Improve formatting of examples in ApiParamInfo
Closed, ResolvedPublic

Description

examples="Get data with content for the last revision of titles "API" and "Main Page":
 api.php?action=query&prop=revisions&titles=API|Main%20Page&rvprop=timestamp|user|comment|content
Get last 5 revisions of the "Main Page":
 api.php?action=query&prop=revisions&titles=Main%20Page&rvlimit=5&rvprop=timestamp|user|comment
Get first 5 revisions of the "Main Page":
 api.php?action=query&prop=revisions&titles=Main%20Page&rvlimit=5&rvprop=timestamp|user|comment&rvdir=newer
Get first 5 revisions of the "Main Page" made after 2006-05-01:
 api.php?action=query&prop=revisions&titles=Main%20Page&rvlimit=5&rvprop=timestamp|user|comment&rvdir=newer&rvstart=20060501000000
Get first 5 revisions of the "Main Page" that were not made made by anonymous user "127.0.0.1"
 api.php?action=query&prop=revisions&titles=Main%20Page&rvlimit=5&rvprop=timestamp|user|comment&rvexcludeuser=127.0.0.1
Get first 5 revisions of the "Main Page" that were made by the user "MediaWiki default"
 api.php?action=query&prop=revisions&titles=Main%20Page&rvlimit=5&rvprop=timestamp|user|comment&rvuser=MediaWiki%20default"

Is not pretty. Using an encoded \n between a list of strings

As such, when implemeting help urls, I switched it to be like

<helpurls>          <helpurl>http://www.mediawiki.org/wiki/API:Properties#revisions_.2F_rv</helpurl>
</helpurls>

As such, I know changing from the (crappy) inline attribute, to a list of elements is a "breaking change", how about doing both (?) for a while, and then sometime in the future, drop the nasty way?

I know it's not so much of a breaking change, as it's not parameter renaming, but it is a format change


Version: 1.20.x
Severity: enhancement

Details

Reference
bz29935

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 21 2014, 11:32 PM
bzimport set Reference to bz29935.

r92430 does the formatting

Just need to decide about the old one...

Removing the old would be breaking. Closing bug as fixed