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

api-platform / core / 15255731762

26 May 2025 01:55PM UTC coverage: 0.0% (-26.5%) from 26.526%
15255731762

Pull #7176

github

web-flow
Merge 66f6cf4d2 into 79edced67
Pull Request #7176: Merge 4.1

0 of 387 new or added lines in 28 files covered. (0.0%)

11394 existing lines in 372 files now uncovered.

0 of 51334 relevant lines covered (0.0%)

0.0 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
×
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,
×
81
        // 'middleware' => null
×
82
    ],
×
83

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

90
    // set to null if you want to keep snake_case
NEW
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' => [
×
101
        //    'api' => [
×
102
        //        'type' => 'Bearer',
×
103
        //        'name' => 'Authentication Token',
×
104
        //        'in' => 'header'
×
105
        //    ]
×
106
        // ],
×
107
        // 'oauth' => [
×
108
        //    'enabled' => true,
×
109
        //    'type' => 'oauth2',
×
110
        //    'flow' => 'authorizationCode',
×
111
        //    'tokenUrl' => '',
×
112
        //    'authorizationUrl' =>'',
×
113
        //    'refreshUrl' => '',
×
114
        //    'scopes' => ['scope1' => 'Description scope 1'],
×
115
        //    'pkce' => true
×
116
        // ],
×
117
        // 'license' => [
×
118
        //    'name' => 'Apache 2.0',
×
119
        //    'url' => 'https://www.apache.org/licenses/LICENSE-2.0.html',
×
120
        // ],
×
121
        // 'contact' => [
×
122
        //    'name' => 'API Support',
×
123
        //    'url' => 'https://www.example.com/support',
×
124
        //    'email' => 'support@example.com',
×
125
        // ],
×
126
        // 'http_auth' => [
×
127
        //    'Personal Access Token' => [
×
128
        //        'scheme' => 'bearer',
×
129
        //        'bearerFormat' => 'JWT'
×
130
        //    ]
×
131
        // ]
×
132
    ],
×
133

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

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

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

145
    // we recommend using "file" or "acpu"
146
    'cache' => 'file',
×
147
];
×
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

© 2025 Coveralls, Inc