PHP code example of widmogrod / zf2-rest-api-documentator
1. Go to this page and download the library: Download widmogrod/zf2-rest-api-documentator library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
widmogrod / zf2-rest-api-documentator example snippets
return array(
// Configuration namespace within this module looking for data
'zf2-rest-api-documentator' => array(
// Contains collection of documentation descriptions.
'docs' => array(
// Namespace of module within REST API description resides. Must be unique per module.
'my_module_name' => array(
'name' => 'api.example.com',
'version' => '1.1',
'baseUrl' => 'http://127.0.0.1:8080/api',
// Strategy is way, in which this configuration will be interpreted.
'strategy' => 'standard',
// General description for common thing in module, to skip redundancy
'general' => array(
'params' => array(
'id' => array(
'type' => 'integer',
' 'body' => array(
'type' => 'WidRestApiDocumentator\Body\JsonBody',
'params' => array(
'name' => array(
'type' => 'string',
' ),
),
),
),
),
),
),
),
);