|
27 | 27 | ], |
28 | 28 |
|
29 | 29 | /* |
30 | | -|-------------------------------------------------------------------------- |
31 | | -| Rest Authorizations |
32 | | -|-------------------------------------------------------------------------- |
33 | | -| |
34 | | -| This is the feature that automatically binds to policies to validate incoming requests. |
35 | | -| Laravel Rest Api will validate each models searched / mutated / deleted to avoid leaks in your API. |
36 | | -| |
37 | | -*/ |
| 30 | + |-------------------------------------------------------------------------- |
| 31 | + | Rest Authorizations |
| 32 | + |-------------------------------------------------------------------------- |
| 33 | + | |
| 34 | + | This is the feature that automatically binds to policies to validate incoming requests. |
| 35 | + | Laravel Rest Api will validate each models searched / mutated / deleted to avoid leaks in your API. |
| 36 | + | |
| 37 | + */ |
38 | 38 |
|
39 | 39 | 'authorizations' => [ |
40 | 40 | 'enabled' => true |
41 | 41 | ], |
| 42 | + |
| 43 | + /* |
| 44 | + |-------------------------------------------------------------------------- |
| 45 | + | Rest Documentation |
| 46 | + |-------------------------------------------------------------------------- |
| 47 | + | |
| 48 | + | This is the feature that generates automatically your API documentation for you. |
| 49 | + | Laravel Rest Api will validate each models searched / mutated / deleted to avoid leaks in your API. |
| 50 | + | This feature is based on OpenApi, for more detail see: https://swagger.io/specification/ |
| 51 | + | |
| 52 | + */ |
| 53 | + |
| 54 | + 'documentation' => [ |
| 55 | + 'routing' => [ |
| 56 | + 'enabled' => true, |
| 57 | + 'domain' => null, |
| 58 | + 'path' => '/api-documentation', |
| 59 | + 'middlewares' => [ |
| 60 | + 'web' |
| 61 | + ] |
| 62 | + ], |
| 63 | + 'info' => [ |
| 64 | + 'title' => config('app.name'), |
| 65 | + 'summary' => 'This is my projet\'s documentation', |
| 66 | + 'description' => 'Find out all about my projet\'s API', |
| 67 | + 'termsOfService' => null, // (Optional) Url to terms of services |
| 68 | + 'contact' => [ |
| 69 | + 'name' => 'My Company', |
| 70 | + 'email' => 'email@company.com', |
| 71 | + 'url' => 'https://company.com' |
| 72 | + ], |
| 73 | + 'license' => [ |
| 74 | + 'url' => null, |
| 75 | + 'name' => 'Apache 2.0', |
| 76 | + 'identifier' => 'Apache-2.0' |
| 77 | + ], |
| 78 | + 'version' => '1.0.0' |
| 79 | + ], |
| 80 | + // See https://spec.openapis.org/oas/v3.1.0#server-object |
| 81 | + 'servers' => [ |
| 82 | + [ |
| 83 | + 'url' => '/', // Relative to current |
| 84 | + 'description' => 'The current server' |
| 85 | + ], |
| 86 | +// [ |
| 87 | +// 'url' => '"https://my-server.com:{port}/{basePath}"', |
| 88 | +// 'description' => 'Production server', |
| 89 | +// 'variables' => [ |
| 90 | +// 'port' => [ |
| 91 | +// 'enum' => ['80', '443'], |
| 92 | +// 'default' => '443' |
| 93 | +// ], |
| 94 | +// 'basePath' => [ |
| 95 | +// 'default' => 'v2', |
| 96 | +// 'enum' => ['v1', 'v2'], |
| 97 | +// ] |
| 98 | +// ] |
| 99 | +// ] |
| 100 | + ], |
| 101 | + // See https://spec.openapis.org/oas/v3.1.0#security-scheme-object |
| 102 | + 'security' => [ |
| 103 | +// [ |
| 104 | +// 'type' => 'http', |
| 105 | +// 'description' => 'description', |
| 106 | +// 'scheme' => 'Bearer', |
| 107 | +// 'bearerFormat' => 'JWT' |
| 108 | +// ], |
| 109 | +// [ |
| 110 | +// 'type' => 'oauth2', |
| 111 | +// 'flows' => [ |
| 112 | +// 'authorizationCode' => [ |
| 113 | +// 'scopes' => ['write:pets'], |
| 114 | +// 'tokenUrl' => 'https://example.com/api/oauth/token', |
| 115 | +// 'authorizationUrl' => 'https://example.com/api/oauth/dialog', |
| 116 | +// 'refreshUrl' => 'https://example.com/api/oauth/refresh', |
| 117 | +// ] |
| 118 | +// ] |
| 119 | +// ] |
| 120 | + ] |
| 121 | + ], |
42 | 122 | ]; |
0 commit comments