forked from clickvisual/clickvisual
-
Notifications
You must be signed in to change notification settings - Fork 0
/
egogen.yaml
37 lines (34 loc) · 981 Bytes
/
egogen.yaml
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
output: api/docs
plugin: gin
dir: 'api'
depends:
- gorm.io/plugin/soft_delete
- github.com/gotomicro/gotoant
- gorm.io/datatypes
#generators:
# - name: umi
# output: ./ui/src/requests
# - name: ts
# output: ./ui/src/types
properties:
request:
- type: '*github.com/clickvisual/clickvisual/api/pkg/component/core.Context'
method: 'Bind'
return:
data:
type: 'args[0]'
response:
- type: '*github.com/clickvisual/clickvisual/api/pkg/component/core.Context'
method: 'JSONOK'
return:
contentType: 'application/json' # 指定响应的 content-type
data: # 这是一个嵌套的数据格式示例 '{"code":0,"msg":"hello",data:{...}}'
type: 'object'
properties:
code:
type: 'number'
msg:
type: 'string'
data:
type: 'args[0]' # 指定为第一个函数参数
status: 200 # 指定为 200 状态码