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

api-platform / core / 13495670835

24 Feb 2025 10:16AM UTC coverage: 7.289% (-0.001%) from 7.29%
13495670835

push

github

web-flow
feat(laravel): add middleware granularity (#6962)

Co-authored-by: soyuka <soyuka@users.noreply.github.com>

0 of 27 new or added lines in 2 files covered. (0.0%)

1 existing line in 1 file now uncovered.

12436 of 170615 relevant lines covered (7.29%)

11.99 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' => '__',
×
NEW
65
        'introspection' => ['enabled' => true],
×
NEW
66
        // 'middleware' => null
×
NEW
67
    ],
×
68

NEW
69
    'graphiql' => [
×
NEW
70
        // 'enabled' => true,
×
NEW
71
        // 'domain' => null,
×
NEW
72
        // 'middleware' => null
×
UNCOV
73
    ],
×
74

75
    'exception_to_status' => [
×
76
        AuthenticationException::class => 401,
×
77
        AuthorizationException::class => 403
×
78
    ],
×
79

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

110
    'url_generation_strategy' => UrlGeneratorInterface::ABS_PATH,
×
111

112
    'serializer' => [
×
113
        'hydra_prefix' => false,
×
114
        // 'datetime_format' => \DateTimeInterface::RFC3339
×
115
    ]
×
116
];
×
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