forked from lichunqiang/sublime-swagger-php-snippets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
oa-get-byids.sublime-snippet
45 lines (45 loc) · 1.25 KB
/
oa-get-byids.sublime-snippet
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
<snippet>
<content><![CDATA[
@OA\Get(
* path = "/${1:helloworld/\{ids\}}",
* operationId = "get-${1:helloworld/\{ids\}}",
* tags = {"${2:helloworld}" },
* summary = "${3:Sample helloworld get list by ids request}",
* description = "${4:Description}",
* @OA\Parameter(
* in = "path",
* name = "${5:ids}",
* description = "Comma delimited list",
* required = true,
* @OA\Schema(
* type = "array",
* @OA\Items(type = "${6:integer}")
* )
* ),
* @OA\Response(
* response = "200",
* description= "Get list of items",
* @OA\JsonContent(
* type = "array",
* @OA\Items(ref = "#/components/schemas/${7:HelloWorldItem}")
* )
* ),
* @OA\Response(
* response = "401",
* ref = "#/components/responses/ErrUnauthorized"
* ),
* @OA\Response(
* response = "404",
* ref = "#/components/responses/ErrNotFound"
* ),
* @OA\Response(
* response = "default",
* ref = "#/components/responses/ErrDefault"
* )
* )
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>oa-get-byids</tabTrigger>
<scope>source.php</scope>
<description>@OA\Get</description>
</snippet>