|
9 | 9 | */ |
10 | 10 |
|
11 | 11 | /** |
12 | | - * @SWG\Get( |
13 | | - * path="/test/rest/", |
14 | | - * tags={"test"}, |
15 | | - * method="GET", |
16 | | - * operationId="getTestCollection", |
17 | | - * summary="Collection of items", |
18 | | - * @SWG\Parameter(ref="#/parameters/offset"), |
19 | | - * @SWG\Parameter(ref="#/parameters/limit"), |
20 | | - * @SWG\Response(response=200, description="Collection present"), |
21 | | - * @SWG\Response(response=206, description="Collection present") |
| 12 | + * @OA\Get( |
| 13 | + * path="/test/rest/", |
| 14 | + * tags={"test"}, |
| 15 | + * method="GET", |
| 16 | + * operationId="getTestCollection", |
| 17 | + * summary="Collection of items", |
| 18 | + * @OA\Parameter(ref="#/components/parameters/offset_in_query"), |
| 19 | + * @OA\Parameter(ref="#/components/parameters/limit_in_query"), |
| 20 | + * @OA\Response( |
| 21 | + * @OA\JsonContent(type="array", @OA\Items(ref="#/components/schemas/test")), |
| 22 | + * response=200, |
| 23 | + * description="Collection" |
| 24 | + * ), |
| 25 | + * @OA\Response( |
| 26 | + * @OA\JsonContent(type="array", @OA\Items(ref="#/components/schemas/test")), |
| 27 | + * response=206, |
| 28 | + * description="Collection (partial)" |
| 29 | + * ) |
22 | 30 | * ) |
23 | 31 | * |
24 | | - * @SWG\Put( |
25 | | - * path="/test/rest/", |
26 | | - * tags={"test"}, |
27 | | - * operationId="updateTestCollection", |
28 | | - * summary="Try to update Collection", |
29 | | - * @SWG\Response(@SWG\Schema(ref="#/definitions/error"), response=501, description="Not Implemented") |
| 32 | + * @OA\Put( |
| 33 | + * path="/test/rest/", |
| 34 | + * tags={"test"}, |
| 35 | + * operationId="updateTestCollection", |
| 36 | + * summary="Try to update Collection", |
| 37 | + * @OA\Response(@OA\JsonContent(ref="#/components/schemas/error"), response=501, description="Not Implemented") |
30 | 38 | * ) |
31 | 39 | * |
32 | | - * @SWG\Delete( |
33 | | - * path="/test/rest/", |
34 | | - * tags={"test"}, |
35 | | - * operationId="deleteTestCollection", |
36 | | - * summary="Try to delete Collection", |
37 | | - * @SWG\Response(@SWG\Schema(ref="#/definitions/error"), response=400, description="Not Found") |
| 40 | + * @OA\Delete( |
| 41 | + * path="/test/rest/", |
| 42 | + * tags={"test"}, |
| 43 | + * operationId="deleteTestCollection", |
| 44 | + * summary="Try to delete Collection", |
| 45 | + * @OA\Response(@OA\JsonContent(ref="#/components/schemas/error"), response=400, description="Not Found") |
38 | 46 | * ) |
39 | 47 | */ |
40 | 48 |
|
41 | 49 | /** |
42 | | - * @SWG\Get( |
43 | | - * path="/test/rest/{itemId}", |
44 | | - * tags={"test"}, |
45 | | - * operationId="getTestById", |
46 | | - * summary="Find item by ID", |
47 | | - * @SWG\Parameter( |
48 | | - * name="itemId", |
49 | | - * in="path", |
50 | | - * description="ID of item that needs to be fetched", |
51 | | - * required=true, |
52 | | - * type="integer" |
53 | | - * ), |
54 | | - * @SWG\Response(@SWG\Schema(ref="#/definitions/test"), response=200, description="Given item found"), |
55 | | - * @SWG\Response(@SWG\Schema(ref="#/definitions/error"), response=404, description="Item not found") |
| 50 | + * @OA\Get( |
| 51 | + * path="/test/rest/{itemId}", |
| 52 | + * tags={"test"}, |
| 53 | + * operationId="getTestById", |
| 54 | + * summary="Find item by ID", |
| 55 | + * @OA\Parameter( |
| 56 | + * name="itemId", |
| 57 | + * in="path", |
| 58 | + * description="ID of item that needs to be fetched", |
| 59 | + * required=true, |
| 60 | + * @OA\Schema(type="integer") |
| 61 | + * ), |
| 62 | + * @OA\Response(@OA\JsonContent(ref="#/components/schemas/test"), response=200, description="Given item found"), |
| 63 | + * @OA\Response(@OA\JsonContent(ref="#/components/schemas/error"), response=404, description="Item Not Found") |
56 | 64 | * ) |
57 | 65 | * |
58 | | - * @SWG\Post( |
59 | | - * path="/test/rest/", |
60 | | - * tags={"test"}, |
61 | | - * operationId="createTest", |
62 | | - * summary="Create Item", |
63 | | - * @SWG\Parameter( |
64 | | - * name="name", |
65 | | - * in="formData", |
66 | | - * description="Name", |
67 | | - * required=true, |
68 | | - * type="string", |
69 | | - * ), |
70 | | - * @SWG\Parameter( |
71 | | - * name="email", |
72 | | - * in="formData", |
73 | | - * description="Email", |
74 | | - * required=true, |
75 | | - * type="string", |
76 | | - * ), |
77 | | - * @SWG\Response(response=201, description="Item created, will return Location of created item"), |
78 | | - * @SWG\Response(response=400, description="Validation errors") |
| 66 | + * @OA\Post( |
| 67 | + * path="/test/rest/", |
| 68 | + * tags={"test"}, |
| 69 | + * operationId="createTest", |
| 70 | + * summary="Create Item", |
| 71 | + * @OA\Parameter( |
| 72 | + * name="name", |
| 73 | + * in="query", |
| 74 | + * description="Name", |
| 75 | + * required=true, |
| 76 | + * @OA\Schema(type="string") |
| 77 | + * ), |
| 78 | + * @OA\Parameter( |
| 79 | + * name="email", |
| 80 | + * in="query", |
| 81 | + * description="Email", |
| 82 | + * required=true, |
| 83 | + * @OA\Schema(type="string") |
| 84 | + * ), |
| 85 | + * @OA\Response(response=201, description="Item created, will return Location of created item"), |
| 86 | + * @OA\Response(@OA\JsonContent(ref="#/components/schemas/error"), response=400, description="Validation errors") |
79 | 87 | * ) |
80 | 88 | * |
81 | | - * @SWG\Post( |
82 | | - * path="/test/rest/{itemId}", |
83 | | - * tags={"test"}, |
84 | | - * operationId="createTestWithId", |
85 | | - * summary="Try to create Item", * |
86 | | - * @SWG\Parameter( |
87 | | - * name="itemId", |
88 | | - * in="path", |
89 | | - * description="ID of item that needs to be removed", |
90 | | - * required=true, |
91 | | - * type="integer" |
92 | | - * ), |
93 | | - * @SWG\Response(@SWG\Schema(ref="#/definitions/error"), response=501, description="Not Implemented") |
| 89 | + * @OA\Post( |
| 90 | + * path="/test/rest/{itemId}", |
| 91 | + * tags={"test"}, |
| 92 | + * operationId="createTestWithId", |
| 93 | + * summary="Try to create Item", * |
| 94 | + * @OA\Parameter( |
| 95 | + * name="itemId", |
| 96 | + * in="path", |
| 97 | + * description="ID of item that needs to be removed", |
| 98 | + * required=true, |
| 99 | + * @OA\Schema(type="integer") |
| 100 | + * ), |
| 101 | + * @OA\Response(@OA\JsonContent(ref="#/components/schemas/error"), response=501, description="Not Implemented") |
94 | 102 | * ) |
95 | 103 | * |
96 | | - * @SWG\Put( |
97 | | - * path="/test/rest/{itemId}", |
98 | | - * tags={"test"}, |
99 | | - * operationId="updateTest", |
100 | | - * summary="Update Item", |
101 | | - * @SWG\Parameter( |
102 | | - * name="itemId", |
103 | | - * in="path", |
104 | | - * description="ID of item that needs to be updated", |
105 | | - * required=true, |
106 | | - * type="integer" |
107 | | - * ), |
108 | | - * @SWG\Parameter( |
109 | | - * name="name", |
110 | | - * in="formData", |
111 | | - * description="Name", |
112 | | - * required=false, |
113 | | - * type="string", |
114 | | - * ), |
115 | | - * @SWG\Parameter( |
116 | | - * name="email", |
117 | | - * in="formData", |
118 | | - * description="Email", |
119 | | - * required=false, |
120 | | - * type="string", |
121 | | - * ), |
122 | | - * @SWG\Response(@SWG\Schema(ref="#/definitions/error"), response=404, description="Item not found") |
| 104 | + * @OA\Put( |
| 105 | + * path="/test/rest/{itemId}", |
| 106 | + * tags={"test"}, |
| 107 | + * operationId="updateTest", |
| 108 | + * summary="Update Item", |
| 109 | + * @OA\Parameter( |
| 110 | + * name="itemId", |
| 111 | + * in="path", |
| 112 | + * description="ID of item that needs to be updated", |
| 113 | + * required=true, |
| 114 | + * @OA\Schema(type="integer") |
| 115 | + * ), |
| 116 | + * @OA\Parameter( |
| 117 | + * name="name", |
| 118 | + * in="query", |
| 119 | + * description="Name", |
| 120 | + * required=false, |
| 121 | + * @OA\Schema(type="string") |
| 122 | + * ), |
| 123 | + * @OA\Parameter( |
| 124 | + * name="email", |
| 125 | + * in="query", |
| 126 | + * description="Email", |
| 127 | + * required=false, |
| 128 | + * @OA\Schema(type="string") |
| 129 | + * ), |
| 130 | + * @OA\Response(@OA\JsonContent(ref="#/components/schemas/error"), response=404, description="Item Not Found") |
123 | 131 | * ) |
124 | 132 | * |
125 | | - * @SWG\Delete( |
126 | | - * path="/test/rest/{itemId}", |
127 | | - * tags={"test"}, |
128 | | - * operationId="deleteTest", |
129 | | - * summary="Delete Item", |
130 | | - * @SWG\Parameter( |
131 | | - * name="itemId", |
132 | | - * in="path", |
133 | | - * description="ID of item that needs to be removed", |
134 | | - * required=true, |
135 | | - * type="integer" |
136 | | - * ), |
137 | | - * @SWG\Response(response=204, description="Item removed"), |
138 | | - * @SWG\Response(response=404, description="Item not found") |
| 133 | + * @OA\Delete( |
| 134 | + * path="/test/rest/{itemId}", |
| 135 | + * tags={"test"}, |
| 136 | + * operationId="deleteTest", |
| 137 | + * summary="Delete Item", |
| 138 | + * @OA\Parameter( |
| 139 | + * name="itemId", |
| 140 | + * in="path", |
| 141 | + * description="ID of item that needs to be removed", |
| 142 | + * required=true, |
| 143 | + * @OA\Schema(type="integer") |
| 144 | + * ), |
| 145 | + * @OA\Response(@OA\JsonContent(ref="#/components/schemas/test"), response=204, description="Item removed"), |
| 146 | + * @OA\Response(@OA\JsonContent(ref="#/components/schemas/error"), response=404, description="Item Not Found") |
139 | 147 | * ) |
140 | 148 | */ |
0 commit comments