This module provides data structures and rendering for the API-Problem format.
- Problem Details for HTTP APIs, used for reporting API problems.
Please see the composer.json file.
Run the following composer
command:
$ composer require "zfcampus/zf-api-problem:~1.0-dev"
Alternately, manually add the following to your composer.json
, in the require
section:
"require": {
"zfcampus/zf-api-problem": "~1.0-dev"
}
And then run composer update
to ensure the module is installed.
Finally, add the module name to your project's config/application.config.php
under the modules
key:
return array(
/* ... */
'modules' => array(
/* ... */
'ZF\ApiProblem',
),
/* ... */
);
The top-level configuration key for user configuration of this module is zf-api-problem
.
An array of Accept
header media types that, when matched, will result in the
ApiProblemListener handling an
MvcEvent::EVENT_RENDER_ERROR
event.
An array of controller service names that, if matched as the controller
parameter in the MVC
RouteMatch
, will cause the ApiProblemListener to handle
MvcEvent::EVENT_RENDER_ERROR
events.