• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

api-platform / core / 17822127136

18 Sep 2025 08:01AM UTC coverage: 22.157%. First build
17822127136

Pull #7392

github

web-flow
Merge 3f6cc33e1 into 91b34d1e4
Pull Request #7392: fix(laravel): correct the example of swagger_ui.apiKeys config

0 of 27 new or added lines in 1 file covered. (0.0%)

11127 of 50220 relevant lines covered (22.16%)

23.41 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Laravel/config/api-platform.php
1
<?php
2

3
/*
4
 * This file is part of the API Platform project.
5
 *
6
 * (c) Kévin Dunglas <dunglas@gmail.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11

12
declare(strict_types=1);
13

14
use ApiPlatform\Metadata\UrlGeneratorInterface;
15
use Illuminate\Auth\Access\AuthorizationException;
16
use Illuminate\Auth\AuthenticationException;
17
use Symfony\Component\Serializer\NameConverter\SnakeCaseToCamelCaseNameConverter;
18

19
return [
×
20
    'title' => 'API Platform',
×
21
    'description' => 'My awesome API',
×
22
    'version' => '1.0.0',
×
23
    'show_webby' => true,
×
24

25
    'routes' => [
×
26
        'domain' => null,
×
27
        // Global middleware applied to every API Platform routes
×
NEW
28
        // 'middleware' => [],
×
29
    ],
×
30

31
    'resources' => [
×
32
        app_path('Models'),
×
33
    ],
×
34

35
    'formats' => [
×
36
        'jsonld' => ['application/ld+json'],
×
37
        // 'jsonapi' => ['application/vnd.api+json'],
×
38
        // 'csv' => ['text/csv'],
×
39
    ],
×
40

41
    'patch_formats' => [
×
42
        'json' => ['application/merge-patch+json'],
×
43
    ],
×
44

45
    'docs_formats' => [
×
46
        'jsonld' => ['application/ld+json'],
×
47
        // 'jsonapi' => ['application/vnd.api+json'],
48
        'jsonopenapi' => ['application/vnd.openapi+json'],
×
49
        'html' => ['text/html'],
×
50
    ],
×
51

52
    'error_formats' => [
×
53
        'jsonproblem' => ['application/problem+json'],
×
54
    ],
×
55

56
    'defaults' => [
×
57
        'pagination_enabled' => true,
×
58
        'pagination_partial' => false,
×
59
        'pagination_client_enabled' => false,
×
60
        'pagination_client_items_per_page' => false,
×
61
        'pagination_client_partial' => false,
×
62
        'pagination_items_per_page' => 30,
×
63
        'pagination_maximum_items_per_page' => 30,
×
64
        'route_prefix' => '/api',
×
65
        'middleware' => [],
×
66
    ],
×
67

68
    'pagination' => [
×
69
        'page_parameter_name' => 'page',
×
70
        'enabled_parameter_name' => 'pagination',
×
71
        'items_per_page_parameter_name' => 'itemsPerPage',
×
72
        'partial_parameter_name' => 'partial',
×
73
    ],
×
74

75
    'graphql' => [
×
76
        'enabled' => false,
×
77
        'nesting_separator' => '__',
×
78
        'introspection' => ['enabled' => true],
×
79
        'max_query_complexity' => 500,
×
80
        'max_query_depth' => 200,
×
NEW
81
        // 'middleware' => null,
×
82
    ],
×
83

84
    'graphiql' => [
×
85
        // 'enabled' => true,
×
86
        // 'domain' => null,
×
NEW
87
        // 'middleware' => null,
×
88
    ],
×
89

90
    // set to null if you want to keep snake_case
91
    'name_converter' => SnakeCaseToCamelCaseNameConverter::class,
×
92

93
    'exception_to_status' => [
×
94
        AuthenticationException::class => 401,
×
95
        AuthorizationException::class => 403,
×
96
    ],
×
97

98
    'swagger_ui' => [
×
99
        'enabled' => true,
×
100
        // 'apiKeys' => [
×
NEW
101
        //     'api' => [
×
NEW
102
        //         'name' => 'Authorization',
×
NEW
103
        //         'type' => 'header',
×
NEW
104
        //     ],
×
105
        // ],
×
106
        // 'oauth' => [
×
NEW
107
        //     'enabled' => true,
×
NEW
108
        //     'type' => 'oauth2',
×
NEW
109
        //     'flow' => 'authorizationCode',
×
NEW
110
        //     'tokenUrl' => '',
×
NEW
111
        //     'authorizationUrl' =>'',
×
NEW
112
        //     'refreshUrl' => '',
×
NEW
113
        //     'scopes' => ['scope1' => 'Description scope 1'],
×
NEW
114
        //     'pkce' => true,
×
115
        // ],
×
116
        // 'license' => [
×
NEW
117
        //     'name' => 'Apache 2.0',
×
NEW
118
        //     'url' => 'https://www.apache.org/licenses/LICENSE-2.0.html',
×
119
        // ],
×
120
        // 'contact' => [
×
NEW
121
        //     'name' => 'API Support',
×
NEW
122
        //     'url' => 'https://www.example.com/support',
×
NEW
123
        //     'email' => 'support@example.com',
×
124
        // ],
×
125
        // 'http_auth' => [
×
NEW
126
        //     'Personal Access Token' => [
×
NEW
127
        //         'scheme' => 'bearer',
×
NEW
128
        //         'bearerFormat' => 'JWT',
×
NEW
129
        //     ],
×
NEW
130
        // ],
×
131
    ],
×
132

133
    // 'openapi' => [
134
    //     'tags' => [],
135
    // ],
136

137
    'url_generation_strategy' => UrlGeneratorInterface::ABS_PATH,
×
138

139
    'serializer' => [
×
140
        'hydra_prefix' => false,
×
NEW
141
        // 'datetime_format' => \DateTimeInterface::RFC3339,
×
142
    ],
×
143

144
    // we recommend using "file" or "acpu"
145
    'cache' => 'file',
×
146

147
    // install `api-platform/http-cache`
×
148
    // 'http_cache' => [
×
149
    //     'etag' => false,
×
150
    //     'max_age' => null,
×
151
    //     'shared_max_age' => null,
×
152
    //     'vary' => null,
×
153
    //     'public' => null,
×
154
    //     'stale_while_revalidate' => null,
×
155
    //     'stale_if_error' => null,
×
156
    //     'invalidation' => [
×
157
    //         'urls' => [],
×
158
    //         'scoped_clients' => [],
×
159
    //         'max_header_length' => 7500,
×
160
    //         'request_options' => [],
×
161
    //         'purger' => ApiPlatform\HttpCache\SouinPurger::class,
×
162
    //     ],
×
NEW
163
    // ],
×
164
];
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc