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

api-platform / core / 13586767090

28 Feb 2025 11:01AM UTC coverage: 8.519% (+0.003%) from 8.516%
13586767090

Pull #6990

github

web-flow
Merge 3b0a00330 into 79fd1eb7e
Pull Request #6990: Merge 4.0

12 of 49 new or added lines in 6 files covered. (24.49%)

2 existing lines in 2 files now uncovered.

13377 of 157029 relevant lines covered (8.52%)

22.89 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
    'show_webby' => true,
×
12

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

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

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

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

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

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

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

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

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

NEW
72
    'graphiql' => [
×
NEW
73
        // 'enabled' => true,
×
NEW
74
        // 'domain' => null,
×
NEW
75
        // 'middleware' => null
×
UNCOV
76
    ],
×
77

78
    'exception_to_status' => [
×
79
        AuthenticationException::class => 401,
×
80
        AuthorizationException::class => 403
×
81
    ],
×
82

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

119
    // 'openapi' => [
120
    //     'tags' => []
121
    // ],
122

123
    'url_generation_strategy' => UrlGeneratorInterface::ABS_PATH,
×
124

125
    'serializer' => [
×
126
        'hydra_prefix' => false,
×
127
        // 'datetime_format' => \DateTimeInterface::RFC3339
×
128
    ],
×
129

130
    // we recommend using "file" or "acpu"
131
    'cache' => 'file'
×
132
];
×
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