forked from lichunqiang/sublime-swagger-php-snippets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
oa-post.sublime-snippet
33 lines (33 loc) · 915 Bytes
/
oa-post.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
<snippet>
<content><![CDATA[
@OA\Post(
* path = "/${1:helloworld}",
* operationId = "post-${1:helloworld}",
* tags = {"${2:helloworld}" },
* summary = "${3:Sample helloworld post request}",
* description = "${4:Description}",
* @OA\RequestBody(
* @OA\JsonContent(
* type = "array",
* @OA\Items(ref = "#/components/schemas/HelloWorldItem")
* )
* )
* @OA\Response(
* response = "201",
* ref = "#/components/responses/Ok"
* ),
* @OA\Response(
* response = "401",
* ref = "#/components/responses/ErrUnauthorized"
* ),
* @OA\Response(
* response = "default",
* ref = "#/components/responses/ErrDefault"
* )
* )
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>oa-post</tabTrigger>
<scope>source.php</scope>
<description>@OA\Post</description>
</snippet>