[wp-trac] [WordPress Trac] #39561: REST API JavaScript client: Correct name route discovery for custom namespaces
WordPress Trac
noreply at wordpress.org
Fri Feb 24 22:47:48 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: fixed-major | Focuses: javascript
-----------------------------+------------------------------
Changes (by SergeyBiryukov):
* status: reopened => closed
* resolution: => fixed
Comment:
In [changeset:"40117"]:
{{{
#!CommitTicketReference repository="" revision="40117"
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, adamsilverstein, jnylen0.
Merges [40074] and [40109] to the 4.7 branch.
Fixes #39561.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39561#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list