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

api-platform / core / 3713134090

pending completion
3713134090

Pull #5254

github

GitHub
Merge b2ec54b3c into ac711530f
Pull Request #5254: [OpenApi] Add ApiResource::openapi and deprecate openapiContext

197 of 197 new or added lines in 5 files covered. (100.0%)

10372 of 12438 relevant lines covered (83.39%)

11.97 hits per line

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

83.33
/src/Metadata/Post.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\Metadata;
15

16
use ApiPlatform\OpenApi\Model\Operation as OpenApiOperation;
17

18
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
19
final class Post extends HttpOperation
20
{
21
    private $itemUriTemplate;
22

23
    /**
24
     * {@inheritdoc}
25
     */
26
    public function __construct(
27
        ?string $uriTemplate = null,
28
        ?array $types = null,
29
        $formats = null,
30
        $inputFormats = null,
31
        $outputFormats = null,
32
        $uriVariables = null,
33
        ?string $routePrefix = null,
34
        ?string $routeName = null,
35
        ?array $defaults = null,
36
        ?array $requirements = null,
37
        ?array $options = null,
38
        ?bool $stateless = null,
39
        ?string $sunset = null,
40
        ?string $acceptPatch = null,
41
        $status = null,
42
        ?string $host = null,
43
        ?array $schemes = null,
44
        ?string $condition = null,
45
        ?string $controller = null,
46
        ?array $cacheHeaders = null,
47

48
        ?array $hydraContext = null,
49
        ?array $openapiContext = null,
50
        bool|OpenApiOperation|null $openapi = null,
51
        ?array $exceptionToStatus = null,
52

53
        ?bool $queryParameterValidationEnabled = null,
54

55
        // abstract operation arguments
56
        ?string $shortName = null,
57
        ?string $class = null,
58
        ?bool $paginationEnabled = null,
59
        ?string $paginationType = null,
60
        ?int $paginationItemsPerPage = null,
61
        ?int $paginationMaximumItemsPerPage = null,
62
        ?bool $paginationPartial = null,
63
        ?bool $paginationClientEnabled = null,
64
        ?bool $paginationClientItemsPerPage = null,
65
        ?bool $paginationClientPartial = null,
66
        ?bool $paginationFetchJoinCollection = null,
67
        ?bool $paginationUseOutputWalkers = null,
68
        ?array $paginationViaCursor = null,
69
        ?array $order = null,
70
        ?string $description = null,
71
        ?array $normalizationContext = null,
72
        ?array $denormalizationContext = null,
73
        ?string $security = null,
74
        ?string $securityMessage = null,
75
        ?string $securityPostDenormalize = null,
76
        ?string $securityPostDenormalizeMessage = null,
77
        ?string $securityPostValidation = null,
78
        ?string $securityPostValidationMessage = null,
79
        ?string $deprecationReason = null,
80
        ?array $filters = null,
81
        ?array $validationContext = null,
82
        $input = null,
83
        $output = null,
84
        $mercure = null,
85
        $messenger = null,
86
        ?bool $elasticsearch = null,
87
        ?int $urlGenerationStrategy = null,
88
        ?bool $read = null,
89
        ?bool $deserialize = null,
90
        ?bool $validate = null,
91
        ?bool $write = null,
92
        ?bool $serialize = null,
93
        ?bool $fetchPartial = null,
94
        ?bool $forceEager = null,
95
        ?int $priority = null,
96
        ?string $name = null,
97
        $provider = null,
98
        $processor = null,
99
        array $extraProperties = [],
100
        ?string $itemUriTemplate = null
101
    ) {
102
        parent::__construct(self::METHOD_POST, ...\func_get_args());
48✔
103
        $this->itemUriTemplate = $itemUriTemplate;
48✔
104
    }
105

106
    public function getItemUriTemplate(): ?string
107
    {
108
        return $this->itemUriTemplate;
×
109
    }
110

111
    public function withItemUriTemplate(string $itemUriTemplate): self
112
    {
113
        $self = clone $this;
1✔
114
        $self->itemUriTemplate = $itemUriTemplate;
1✔
115

116
        return $self;
1✔
117
    }
118
}
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