-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresponses.php
More file actions
124 lines (122 loc) · 3.23 KB
/
responses.php
File metadata and controls
124 lines (122 loc) · 3.23 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
120
121
122
123
124
<?php
/**
* @OA\Schema(
* schema="ErrorResponse",
* type="object",
* description="The error response format",
* required={"message", "status_code", "type"},
* @OA\Property(
* property="message",
* type="string",
* description="The error message",
* ),
* @OA\Property(
* property="status_code",
* type="integer",
* description="The error HTTP status code",
* ),
* @OA\Property(
* property="type",
* type="string",
* description="The error type",
* ),
* @OA\Property(
* property="code",
* type="integer",
* description="The system error code",
* ),
* ),
*
* @OA\Schema(
* schema="ValidationErrorResponse",
* type="object",
* description="The validation error response format",
* allOf={
* @OA\Schema(ref="#/components/schemas/ErrorResponse"),
* },
* @OA\Property(
* property="errors",
* type="object",
* description="The error details"
* )
* ),
*
* @OA\Schema(
* schema="MetaPagination",
* description="Pagination meta data",
* @OA\Property(
* property="pagination",
* type="object",
* @OA\Property(
* property="total",
* type="integer",
* ),
* @OA\Property(
* property="count",
* type="integer",
* ),
* @OA\Property(
* property="per_page",
* type="integer",
* ),
* @OA\Property(
* property="current_page",
* type="integer",
* ),
* @OA\Property(
* property="total_pages",
* type="integer",
* ),
* ),
* ),
*/
/**
* @OA\Response(
* response="BadRequest",
* description="Bad Request",
* @OA\JsonContent(
* ref="#/components/schemas/ErrorResponse",
* example={"message": "Bad Request", "type": "HttpException", "status_code": 400},
* ),
* ),
* @OA\Response(
* response="Unauthenticated",
* description="Unauthenticated",
* @OA\JsonContent(
* ref="#/components/schemas/ErrorResponse",
* example={"message": "Unauthenticated", "type": "AuthenticationException", "status_code": 401},
* ),
* ),
* @OA\Response(
* response="Forbidden",
* description="Access forbidden",
* @OA\JsonContent(
* ref="#/components/schemas/ErrorResponse",
* example={"message": "Forbidden", "type": "HttpException", "status_code": 403},
* ),
* ),
* @OA\Response(
* response="NotFound",
* description="Resource was not found",
* @OA\JsonContent(
* ref="#/components/schemas/ErrorResponse",
* example={"message": "Not Found", "type": "HttpException", "status_code": 404},
* ),
* ),
* @OA\Response(
* response="Unprocessable",
* description="The given data was invalid",
* @OA\JsonContent(
* ref="#/components/schemas/ValidationErrorResponse",
* example={"message": "The given data was invalid.", "type": "ValidationException", "status_code": 422, "errors": {"type": {"The type field is required."}, "reason": {"The reason field is required."}}},
* ),
* ),
* @OA\Response(
* response="ServerError",
* description="Internal server error",
* @OA\JsonContent(
* ref="#/components/schemas/ErrorResponse",
* example={"message": "Internal server error", "type": "HttpException", "status_code": 500},
* ),
* ),
*/