apidoc.php 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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 (wildcards are supported).
  53. */
  54. 'include' => [
  55. // 'users.index', 'healthcheck*'
  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 (wildcards are supported).
  61. */
  62. 'exclude' => [
  63. // 'users.create', 'admin.*'
  64. ],
  65. /*
  66. * Specify rules to be applied to all the routes in this group when generating documentation
  67. */
  68. 'apply' => [
  69. /*
  70. * Specify headers to be added to the example requests
  71. */
  72. 'headers' => [
  73. // 'Authorization' => 'Bearer: {token}',
  74. // 'Api-Version' => 'v2',
  75. ],
  76. /*
  77. * If no @response or @transformer declaratons are found for the route,
  78. * we'll try to get a sample response by attempting an API call.
  79. * Configure the settings for the API call here,
  80. */
  81. 'response_calls' => [
  82. /*
  83. * API calls will be made only for routes in this group matching these HTTP methods (GET, POST, etc).
  84. * List the methods here or use '*' to mean all methods. Leave empty to disable API calls.
  85. */
  86. 'methods' => ['GET'],
  87. /*
  88. * For URLs which have parameters (/users/{user}, /orders/{id?}),
  89. * specify what values the parameters should be replaced with.
  90. * Note that you must specify the full parameter, including curly brackets and question marks if any.
  91. */
  92. 'bindings' => [
  93. // '{user}' => 1
  94. ],
  95. /*
  96. * Environment variables which should be set for the API call.
  97. * This is a good place to ensure that notifications, emails
  98. * and other external services are not triggered during the documentation API calls
  99. */
  100. 'env' => [
  101. 'APP_ENV' => 'documentation',
  102. 'APP_DEBUG' => false,
  103. // 'env_var' => 'value',
  104. ],
  105. /*
  106. * Headers which should be sent with the API call.
  107. */
  108. 'headers' => [
  109. 'Content-Type' => 'application/json',
  110. 'Accept' => 'application/json',
  111. // 'key' => 'value',
  112. ],
  113. /*
  114. * Query parameters which should be sent with the API call.
  115. */
  116. 'query' => [
  117. // 'key' => 'value',
  118. ],
  119. /*
  120. * Body parameters which should be sent with the API call.
  121. */
  122. 'body' => [
  123. // 'key' => 'value',
  124. ],
  125. ],
  126. ],
  127. ],
  128. ],
  129. /*
  130. * Custom logo path. Will be copied during generate command. Set this to false to use the default logo.
  131. *
  132. * Change to an absolute path to use your custom logo. For example:
  133. * 'logo' => resource_path('views') . '/api/logo.png'
  134. *
  135. * If you want to use this, please be aware of the following rules:
  136. * - size: 230 x 52
  137. */
  138. 'logo' => false,
  139. ];