Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save joelstransky/12e5354c4622c4fc11dddf95c4a5e264 to your computer and use it in GitHub Desktop.
Save joelstransky/12e5354c4622c4fc11dddf95c4a5e264 to your computer and use it in GitHub Desktop.
// when I test this http://192.168.10.11/wp-json/docs/v1
// I get this.
// I only registered this: register_rest_route( 'docs/v1/s' , array() );
// So where in the heck did "/docs/v1/terms/(?P<taxonomy>[\\w-]+)" come from!?
{
"namespace": "docs/v1",
"routes": {
"/docs/v1": {
"namespace": "docs/v1",
"methods": [
"GET"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": {
"namespace": {
"required": false,
"default": "docs/v1"
},
"context": {
"required": false,
"default": "view"
}
}
}
],
"_links": {
"self": "http://192.168.10.11/wp-json/docs/v1"
}
},
"/docs/v1/s": {
"namespace": "docs/v1",
"methods": [
"GET",
"GET"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": []
},
{
"methods": [
"GET"
],
"args": []
}
],
"_links": {
"self": "http://192.168.10.11/wp-json/docs/v1/s"
}
},
"/docs/v1/terms/(?P<taxonomy>[\\w-]+)": {
"namespace": "docs/v1",
"methods": [
"GET"
],
"endpoints": [
{
"methods": [
"GET"
],
"args": []
}
]
}
},
"_links": {
"up": [
{
"href": "http://192.168.10.11/wp-json/"
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment