[wp-trac] [WordPress Trac] #39561: REST API JavaScript client: Correct name route discovery for custom namespaces

WordPress Trac noreply at wordpress.org
Fri Feb 17 20:53:58 UTC 2017


#39561: REST API JavaScript client: Correct name route discovery for custom
namespaces
-----------------------------+------------------------------
 Reporter:  adamsilverstein  |       Owner:  adamsilverstein
     Type:  defect (bug)     |      Status:  closed
 Priority:  normal           |   Milestone:  4.7.3
Component:  REST API         |     Version:  4.7
 Severity:  normal           |  Resolution:  fixed
 Keywords:  commit           |     Focuses:  javascript
-----------------------------+------------------------------
Changes (by adamsilverstein):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"40074"]:
 {{{
 #!CommitTicketReference repository="" revision="40074"
 REST API: JavaScript client - improve route discovery for custom
 namespaces.

 Fix parsing of custom namespace routes. Transform class names, removing
 dashes and capitalizing each word/route part so a route path of `widgets
 /recent-posts` becomes a collection with the name `WidgetsRecentPosts`.
 Correct parent route part when routes are longer than expected, reversing
 parse direction.

 Props westonruter, jazbek.
 Fixes #39561.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39561#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list