forked from zircote/swagger-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample-object.php
More file actions
57 lines (53 loc) · 1.32 KB
/
Copy pathexample-object.php
File metadata and controls
57 lines (53 loc) · 1.32 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
<?php
use OpenApi\Annotations as OA;
/**
* @OA\Info(
* version="1.0",
* title="Example for response examples value"
* )
*/
/**
* @OA\Put(
* path="/users/{id}",
* summary="Updates a user",
* @OA\Parameter(
* description="Parameter with mutliple examples",
* in="path",
* name="id",
* required=true,
* @OA\Schema(type="string"),
* @OA\Examples(example="int", value="1", summary="An int value."),
* @OA\Examples(example="uuid", value="0006faf6-7a61-426c-9034-579f2cfcfa83", summary="An UUID value."),
* ),
* @OA\Response(
* response=200,
* description="OK"
* )
* )
*/
/**
* @OA\Post(
* path="/users",
* summary="Adds a new user",
* @OA\RequestBody(
* @OA\MediaType(
* mediaType="application/json",
* @OA\Schema(
* @OA\Property(
* property="id",
* type="string"
* ),
* @OA\Property(
* property="name",
* type="string"
* ),
* example={"id": "a3fb6", "name": "Jessica Smith"}
* )
* )
* ),
* @OA\Response(
* response=200,
* description="OK"
* )
* )
*/