Releases: matapatos/wp-fastendpoints
Releases · matapatos/wp-fastendpoints
v2.1.0
- Adds support for router dependencies
- Adds dependencies support for native WP REST endpoints by passing dependencies via argument
$router = new Router('api', 'v1');
$router->depends('buddypress'); // Global dependency across all sub-routers/endpoints
// Support for native WP REST endpoints
$args = [
'methods' => 'GET',
'depends' => ['buddypress'],
...
];
register_rest_route('api/v1', 'custom-endpoint', $args);
v2.0.0
- Changed variable special vars from {ID} to <ID> to keep consistency
- Specifying endpoint plugin dependencies. This feature by its own doesn't do anything but if the WP-FastEndpoints-Depends plugin is active it does speed up your endpoints 😊
$router->get('(?P<postId>[\d]+)', function ($postId) {
return get_post($postId);
})
->hasCap('edit_post', '<ID>')
// With WP-FastEndpoints-Depends it only loads the buddypress plugin
->depends('buddypress');
v1.2.2
- Added three new filter hooks to allow the customisation of the JSON schema validator:
- fastendpoints_validator - Triggered by all validators e.g. schema and response
- fastendpoints_schema_validator - Triggered only by the request schema validator
- fastendpoints_response_validator - Triggered only by the response schema validator
v1.2.1
- Taking advantage of schema loader and resolver from json/opis instead of custom one
v1.2.0
v1.1.0
Initial release
Makes working with WordPress REST endpoints a breeze.