-
Notifications
You must be signed in to change notification settings - Fork 939
Expand file tree
/
Copy pathDocblocks.php
More file actions
119 lines (102 loc) · 2.13 KB
/
Copy pathDocblocks.php
File metadata and controls
119 lines (102 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?php declare(strict_types=1);
/**
* @license Apache 2.0
*/
namespace OpenApi\Tests\Fixtures\Scratch;
use OpenApi\Annotations as OA;
use OpenApi\Attributes as OAT;
/**
* @OA\OpenApi(
* openapi="3.0.0"
* )
*
* @OA\Schema
*/
class DocblocksSchema
{
/**
* @OA\Property
* @var string The name
*/
public $name;
/**
* @OA\Property
* @var string The name (old)
*
* @deprecated
*/
public $oldName;
/**
* @OA\Property
* @var int<5,25> The range integer
*/
public $rangeInt;
/**
* @OA\Property
* @var int<2,max> The minimum range integer
*/
public $minRangeInt;
/**
* @OA\Property
* @var int<min,10> The maximum range integer
*/
public $maxRangeInt;
/**
* @OA\Property
* @var positive-int The positive integer
*/
public $positiveInt;
/**
* @OA\Property
* @var negative-int The negative integer
*/
public $negativeInt;
/**
* @OA\Property
* @var non-positive-int The non-positive integer
*/
public $nonPositiveInt;
/**
* @OA\Property
* @var non-negative-int The non-negative integer
*/
public $nonNegativeInt;
/**
* @OA\Property
* @var non-zero-int The non-zero integer
*/
public $nonZeroInt;
}
#[OAT\Schema]
class DocblockSchemaChild extends DocblocksSchema
{
/** @var int The id */
#[OAT\Property]
public $id;
/**
* Some other name.
*/
#[OAT\Property(description: null)]
public string $someOtherName;
}
/**
* @OA\Info(title="Docblocks", version="1.0")
*/
class DocblocksEndpoint
{
/**
* @param string|null $filter Optional filter
* @param int|null $limit Optional limit
*/
#[OAT\Get(
path: '/api/endpoint',
)]
#[OAT\Response(response: 200, description: 'successful operation')]
public function endpoint(
/* @var string|null $filter An optional filter */
#[OAT\QueryParameter(description: null)] ?string $filter,
/* @var string|null $limit An optional limit */
#[OAT\QueryParameter] ?int $limit,
) {
}
}