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

api-platform / core / 13202629907

07 Feb 2025 03:13PM UTC coverage: 7.554% (+0.3%) from 7.283%
13202629907

Pull #6954

github

web-flow
Merge 696625eca into 89816721e
Pull Request #6954: perf: various optimizations for Laravel/Symfony

10 of 18 new or added lines in 4 files covered. (55.56%)

94 existing lines in 8 files now uncovered.

9931 of 131474 relevant lines covered (7.55%)

4.44 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
use ApiPlatform\Metadata\UrlGeneratorInterface;
4
use Illuminate\Auth\Access\AuthorizationException;
5
use Illuminate\Auth\AuthenticationException;
6

7
return [
×
8
    'title' => 'API Platform',
×
9
    'description' => 'My awesome API',
×
10
    'version' => '1.0.0',
×
11

12
    'routes' => [
×
13
        'domain' => null,
×
14
        // Global middleware applied to every API Platform routes
×
15
        // 'middleware' => []
×
16
    ],
×
17

18
    'resources' => [
×
19
        app_path('Models'),
×
20
    ],
×
21

22
    'formats' => [
×
23
        'jsonld' => ['application/ld+json'],
×
24
        //'jsonapi' => ['application/vnd.api+json'],
×
25
        //'csv' => ['text/csv'],
×
26
    ],
×
27

28
    'patch_formats' => [
×
29
        'json' => ['application/merge-patch+json'],
×
30
    ],
×
31

32
    'docs_formats' => [
×
33
        'jsonld' => ['application/ld+json'],
×
34
        //'jsonapi' => ['application/vnd.api+json'],
35
        'jsonopenapi' => ['application/vnd.openapi+json'],
×
36
        'html' => ['text/html'],
×
37
    ],
×
38

39
    'error_formats' => [
×
40
        'jsonproblem' => ['application/problem+json'],
×
41
    ],
×
42

43
    'defaults' => [
×
44
        'pagination_enabled' => true,
×
45
        'pagination_partial' => false,
×
46
        'pagination_client_enabled' => false,
×
47
        'pagination_client_items_per_page' => false,
×
48
        'pagination_client_partial' => false,
×
49
        'pagination_items_per_page' => 30,
×
50
        'pagination_maximum_items_per_page' => 30,
×
51
        'route_prefix' => '/api',
×
52
        'middleware' => [],
×
53
    ],
×
54

55
    'pagination' => [
×
56
        'page_parameter_name' => 'page',
×
57
        'enabled_parameter_name' => 'pagination',
×
58
        'items_per_page_parameter_name' => 'itemsPerPage',
×
59
        'partial_parameter_name' => 'partial',
×
60
    ],
×
61

62
    'graphql' => [
×
63
        'enabled' => false,
×
64
        'nesting_separator' => '__',
×
65
        'introspection' => ['enabled' => true]
×
66
    ],
×
67

68
    'exception_to_status' => [
×
69
        AuthenticationException::class => 401,
×
70
        AuthorizationException::class => 403
×
71
    ],
×
72

73
    'swagger_ui' => [
×
74
        'enabled' => true,
×
75
        //'apiKeys' => [
×
76
        //    'api' => [
×
77
        //        'type' => 'Bearer',
×
78
        //        'name' => 'Authentication Token',
×
79
        //        'in' => 'header'
×
80
        //    ]
×
81
        //],
×
82
        //'oauth' => [
×
83
        //    'enabled' => true,
×
84
        //    'type' => 'oauth2',
×
85
        //    'flow' => 'authorizationCode',
×
86
        //    'tokenUrl' => '',
×
87
        //    'authorizationUrl' =>'',
×
88
        //    'refreshUrl' => '',
×
89
        //    'scopes' => ['scope1' => 'Description scope 1'],
×
90
        //    'pkce' => true
×
91
        //],
×
92
        //'license' => [
×
93
        //    'name' => 'Apache 2.0',
×
94
        //    'url' => 'https://www.apache.org/licenses/LICENSE-2.0.html',
×
95
        //],
×
96
        //'contact' => [
×
97
        //    'name' => 'API Support',
×
98
        //    'url' => 'https://www.example.com/support',
×
99
        //    'email' => 'support@example.com',
×
100
        //],
×
101
    ],
×
102

103
    'url_generation_strategy' => UrlGeneratorInterface::ABS_PATH,
×
104

105
    'serializer' => [
×
106
        'hydra_prefix' => false,
×
107
        // 'datetime_format' => \DateTimeInterface::RFC3339
×
108
    ],
×
109

110
    // we recommend using "file" or "acpu"
UNCOV
111
    'cache' => 'file'
×
UNCOV
112
];
×
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