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

api-platform / core / 13203378522

07 Feb 2025 03:56PM UTC coverage: 8.501% (+0.7%) from 7.837%
13203378522

push

github

soyuka
Merge 4.1

111 of 490 new or added lines in 51 files covered. (22.65%)

5590 existing lines in 163 files now uncovered.

13345 of 156987 relevant lines covered (8.5%)

22.88 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',
×
UNCOV
11
    'show_webby' => true,
×
12

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

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

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

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

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

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

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

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

63
    'graphql' => [
×
64
        'enabled' => false,
×
65
        'nesting_separator' => '__',
×
66
        'introspection' => ['enabled' => true],
×
UNCOV
67
        'max_query_complexity' => 500,
×
68
        'max_query_depth' => 200
×
69
    ],
×
70

71
    'exception_to_status' => [
×
UNCOV
72
        AuthenticationException::class => 401,
×
73
        AuthorizationException::class => 403
×
74
    ],
×
75

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

112
    // 'openapi' => [
113
    //     'tags' => []
114
    // ],
115

UNCOV
116
    'url_generation_strategy' => UrlGeneratorInterface::ABS_PATH,
×
117

UNCOV
118
    'serializer' => [
×
UNCOV
119
        'hydra_prefix' => false,
×
UNCOV
120
        // 'datetime_format' => \DateTimeInterface::RFC3339
×
NEW
121
    ],
×
122

123
    // we recommend using "file" or "acpu"
NEW
124
    'cache' => 'file'
×
UNCOV
125
];
×
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