forked from zircote/swagger-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmisc-api.php
More file actions
74 lines (70 loc) · 1.55 KB
/
misc-api.php
File metadata and controls
74 lines (70 loc) · 1.55 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
<?php
namespace OpenApi\Examples\Misc;
/**
* @OA\OpenApi(
* security={{"bearerAuth": {}}}
* )
*
* @OA\Info(
* title="Testing annotations from bugreports",
* version="1.0.0",
* description="NOTE:
This sentence is on a new line"
* )
*
* @OA\Components(
* @OA\SecurityScheme(
* securityScheme="bearerAuth",
* type="http",
* scheme="bearer",
* ),
* @OA\Attachable
* )
*
* @OA\Server(
* url="{schema}://host.dev",
* description="OpenApi parameters",
* @OA\ServerVariable(
* serverVariable="schema",
* enum={"https", "http"},
* default="https"
* )
* )
*/
class OpenApiSpec
{
}
/**
* An API endpoint.
*
* @OA\Get(
* path="/api/endpoint",
* @OA\Parameter(name="filter", in="query", @OA\JsonContent(
* @OA\Property(property="type", type="string"),
* @OA\Property(property="color", type="string"),
* )),
* security={{ "bearerAuth": {} }},
* @OA\Response(response="200", ref="#/components/responses/200")
* )
*/
class Endpoint
{
}
/**
* @OA\Response(
* response=200,
* description="Success",
* @OA\MediaType(
* mediaType="application/json",
* @OA\Schema(
* @OA\Property(property="name", type="integer", description="demo")
* ),
* @OA\Examples(example=200, summary="", value={"name": 1}),
* @OA\Examples(example=300, summary="", value={"name": 1}),
* @OA\Examples(example=400, summary="", value={"name": 1})
* )
* )
*/
class Response
{
}