[wp-trac] [WordPress Trac] #4600: Codex documentation for WP extensions doesn't match actual behavior

WordPress Trac wp-trac at lists.automattic.com
Mon Jul 9 15:37:07 GMT 2007


#4600: Codex documentation for WP extensions doesn't match actual behavior
------------------------+---------------------------------------------------
 Reporter:  redsweater  |       Owner:  anonymous
     Type:  defect      |      Status:  new      
 Priority:  normal      |   Milestone:           
Component:  XML-RPC     |     Version:  2.2.1    
 Severity:  normal      |    Keywords:           
------------------------+---------------------------------------------------
 I've noticed in implementing client support for the new WP extensions to
 the MovableType API, that there are some discrepancies between the
 documented structure types and the actual types returned/expected by the
 API.

 In general, I expect that almost every instance of a struct element being
 identified as "int" should actually be identified as "string" (with a
 possible caveat that the value must be a numeric string).

 Specifically I noticed that the struct response for wp.newCategory returns
 <string> elements for the comment ID and parent ID. This is consistent
 with MovableType's habit of using <string> for all the numeric parameter
 values.

 I think it's a good idea to keep WordPress's current behavior, because it
 makes the struct typing very compatible with MovableType. But the Codex
 should be updated so as not to encourage clients to expect a different
 format than they'll receive.

 Probably this will be a somewhat tedious task to do accurately, as it may
 require somebody pushing test requests through for all the documented
 methods and verifying that the request and response values should indeed
 be <string>. I would recommend doing this testing with an assumption
 towards them being <string>, because it seems exceedingly likely based on
 the observed behavior for wp.newCategory.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4600>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list