Certain route params are not being transcribed properly
AndrewNatoli opened this issue · comments
Andrew commented
wp-api-menus
has a few route definitions that don't get transcribed properly.
Example:
"/wp-api-menus/v2/menus/(?P<id>\\d+)": {
"namespace": "wp-api-menus/v2",
"methods": [
"GET"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"context": {
"required": false,
"default": "view"
}
}
}
]
},
Gets turned to:
export const getMenusById = (args = {}) => {
const body = {};
if (args.context !== undefined) {
body.context = args.context
}
return WordpressService.doRequest({
method: "GET",
url: "wp-api-menus/v2/menus/(?P<id>\d+)"
})
}