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

api-platform / core / 15069419398

16 May 2025 01:19PM UTC coverage: 21.832%. First build
15069419398

Pull #6960

github

web-flow
Merge 88ff9fb4b into b6080d419
Pull Request #6960: feat(json-schema): mutualize json schema between formats

0 of 470 new or added lines in 25 files covered. (0.0%)

11116 of 50915 relevant lines covered (21.83%)

29.49 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/JsonSchema/SchemaUriPrefixTrait.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
namespace ApiPlatform\JsonSchema;
15

16
/**
17
 * @internal
18
 */
19
trait SchemaUriPrefixTrait
20
{
21
    public function getSchemaUriPrefix(string $version): string
22
    {
NEW
23
        return match ($version) {
NEW
24
            Schema::VERSION_OPENAPI => '#/components/schemas/',
15✔
NEW
25
            default => '#/definitions/',
15✔
NEW
26
        };
27
    }
28
}
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