mirror of
https://github.com/ambieco/scribe.git
synced 2026-04-24 05:54:57 +08:00
96 lines
2.7 KiB
PHP
96 lines
2.7 KiB
PHP
<?php
|
|
|
|
return [
|
|
|
|
/*
|
|
* The output path for the generated documentation.
|
|
*/
|
|
'output' => 'public/docs',
|
|
|
|
|
|
/*
|
|
* The router to be used (Laravel or Dingo).
|
|
*/
|
|
'router' => 'laravel',
|
|
|
|
/*
|
|
* Generate a Postman collection in addition to HTML docs.
|
|
*/
|
|
'postman' => true,
|
|
|
|
|
|
/*
|
|
* The routes for which documentation should be generated.
|
|
* Each group contains rules defining which routes should be included ('match', 'include' and 'exclude' sections)
|
|
* and rules which should be applied to them ('apply' section).
|
|
*/
|
|
'routes' => [
|
|
[
|
|
/*
|
|
* Specify conditions to determine what routes will be parsed in this group.
|
|
* A route must fulfill ALL conditions to pass.
|
|
*/
|
|
'match' => [
|
|
|
|
/*
|
|
* Match only routes whose domains match this pattern (use * as a wildcard to match any characters).
|
|
*/
|
|
'domains' => [
|
|
'*',
|
|
// 'domain1.*',
|
|
],
|
|
|
|
/*
|
|
* Match only routes whose paths match this pattern (use * as a wildcard to match any characters).
|
|
*/
|
|
'prefixes' => [
|
|
'*',
|
|
// 'users/*',
|
|
],
|
|
|
|
/*
|
|
* Match only routes registered under this version. This option is ignored for Laravel router.
|
|
* Note that wildcards are not supported.
|
|
*/
|
|
'versions' => [
|
|
'v1',
|
|
],
|
|
],
|
|
|
|
/*
|
|
* Include these routes when generating documentation,
|
|
* even if they did not match the rules above.
|
|
* Note that the route must be referenced by name here.
|
|
*/
|
|
'include' => [
|
|
// 'users.index',
|
|
],
|
|
|
|
/*
|
|
* Exclude these routes when generating documentation,
|
|
* even if they matched the rules above.
|
|
* Note that the route must be referenced by name here.
|
|
*/
|
|
'exclude' => [
|
|
// 'users.create',
|
|
],
|
|
|
|
/*
|
|
* Specify rules to be applied to all the routes in this group when generating documentation
|
|
*/
|
|
'apply' => [
|
|
'requests' => [
|
|
|
|
/*
|
|
* Specify headers to be added to the example requests
|
|
*/
|
|
'headers' => [
|
|
// 'Authorization' => 'Bearer: {token}',
|
|
// 'Api-Version' => 'v2',
|
|
],
|
|
],
|
|
],
|
|
],
|
|
],
|
|
];
|