apidoc.php 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <?php
  2. return [
  3. /*
  4. * The output path for the generated documentation.
  5. */
  6. 'output' => 'public/docs',
  7. /*
  8. * The router to be used (Laravel or Dingo).
  9. */
  10. 'router' => 'laravel',
  11. /*
  12. * Generate a Postman collection in addition to HTML docs.
  13. */
  14. 'postman' => true,
  15. /*
  16. * The routes for which documentation should be generated.
  17. * Each group contains rules defining which routes should be included ('match', 'include' and 'exclude' sections)
  18. * and rules which should be applied to them ('apply' section).
  19. */
  20. 'routes' => [
  21. [
  22. /*
  23. * Specify conditions to determine what routes will be parsed in this group.
  24. * A route must fulfill ALL conditions to pass.
  25. */
  26. 'match' => [
  27. /*
  28. * Match only routes whose domains match this pattern (use * as a wildcard to match any characters).
  29. */
  30. 'domains' => [
  31. '*',
  32. // 'domain1.*',
  33. ],
  34. /*
  35. * Match only routes whose paths match this pattern (use * as a wildcard to match any characters).
  36. */
  37. 'prefixes' => [
  38. '*',
  39. // 'users/*',
  40. ],
  41. /*
  42. * Match only routes registered under this version. This option is ignored for Laravel router.
  43. * Note that wildcards are not supported.
  44. */
  45. 'versions' => [
  46. 'v1',
  47. ],
  48. ],
  49. /*
  50. * Include these routes when generating documentation,
  51. * even if they did not match the rules above.
  52. * Note that the route must be referenced by name here.
  53. */
  54. 'include' => [
  55. // 'users.index',
  56. ],
  57. /*
  58. * Exclude these routes when generating documentation,
  59. * even if they matched the rules above.
  60. * Note that the route must be referenced by name here.
  61. */
  62. 'exclude' => [
  63. // 'users.create',
  64. ],
  65. /*
  66. * Specify rules to be applied to all the routes in this group when generating documentation
  67. */
  68. 'apply' => [
  69. 'requests' => [
  70. /*
  71. * Specify headers to be added to the example requests
  72. */
  73. 'headers' => [
  74. // 'Authorization' => 'Bearer: {token}',
  75. // 'Api-Version' => 'v2',
  76. ],
  77. ],
  78. ],
  79. ],
  80. ],
  81. ];