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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
|
<?php return [
'version' => '1.0',
'info' => ['style' => 'ROA', 'product' => 'btripOpen', 'version' => '2022-05-17'],
'directories' => [
[
'id' => 167494,
'title' => null,
'type' => 'directory',
'children' => ['ScanMsgList'],
],
[
'id' => 167496,
'title' => null,
'type' => 'directory',
'children' => ['TakeAccessToken'],
],
],
'components' => [
'schemas' => [],
],
'apis' => [
'ScanMsgList' => [
'summary' => '消息扫描',
'path' => '/ScanMsgList',
'methods' => ['post'],
'schemes' => ['https'],
'security' => [
[
'btripOpen' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'ChannelType',
'in' => 'formData',
'schema' => ['title' => '消息渠道Type', 'description' => '', 'type' => 'string', 'required' => false, 'example' => 'hdm_alarm_sms,dingtalk'],
],
[
'name' => 'SequenceId',
'in' => 'formData',
'schema' => ['title' => '商旅消息Id', 'description' => '', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '1130107041'],
],
[
'name' => 'Biz',
'in' => 'formData',
'schema' => ['title' => '业务类型', 'description' => '', 'type' => 'string', 'required' => false, 'example' => 'Verify_RPBio'],
],
[
'name' => 'ScanSequence',
'in' => 'formData',
'schema' => ['title' => '扫描顺序', 'description' => '', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1122221'],
],
[
'name' => 'Size',
'in' => 'formData',
'schema' => ['title' => '查询数量', 'description' => '', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '10'],
],
[
'name' => 'CorpId',
'in' => 'formData',
'schema' => ['title' => '企业ID', 'description' => '', 'type' => 'string', 'required' => false, 'example' => '3562012953454577801'],
],
[
'name' => 'UserId',
'in' => 'formData',
'schema' => ['title' => '用户ID', 'description' => '', 'type' => 'string', 'required' => false, 'example' => 'qqqqqqq'],
],
],
'responses' => [
200 => [
'schema' => [
'title' => 'BtripResult<List<BtripMsgDTO>>',
'description' => 'BtripResult<List<BtripMsgDTO>>',
'type' => 'object',
'properties' => [
'Success' => ['title' => '成功标识', 'description' => '', 'type' => 'boolean', 'example' => 'True'],
'Code' => ['title' => '错误代码', 'description' => '', 'type' => 'integer', 'format' => 'int32', 'example' => 'OK'],
'Msg' => ['title' => '出错消息', 'description' => '', 'type' => 'string', 'example' => 'success'],
'ExtMsg' => ['title' => '结果扩展信息', 'description' => '', 'type' => 'string', 'example' => 'dddd'],
'Module' => [
'title' => '返回对象',
'description' => '',
'type' => 'array',
'items' => [
'description' => 'module',
'type' => 'object',
'properties' => [
'SequenceId' => ['title' => '商旅消息ID', 'description' => '', 'type' => 'integer', 'format' => 'int64', 'example' => '1135434288'],
'Biz' => ['title' => '业务类型', 'description' => '', 'type' => 'string', 'example' => 'CREATE'],
'Content' => ['title' => '消息内容', 'description' => '', 'type' => 'string', 'example' => 'True'],
'SendTime' => ['title' => '发送时间', 'description' => '', 'type' => 'string', 'example' => '{\\"type\\":\\"week\\",\\"day\\":\\"5\\",\\"date\\":\\"1\\",\\"hour\\":\\"18\\",\\"month\\":\\"1\\"}'],
'HaveRedDot' => ['title' => '是否有红点', 'description' => '', 'type' => 'boolean', 'example' => 'True'],
'UnReadCount' => ['title' => '未读数量', 'description' => '', 'type' => 'integer', 'format' => 'int32', 'example' => '111'],
'ShowMsg' => ['title' => '灰度:是否展示消息', 'description' => '', 'type' => 'boolean', 'example' => 'True'],
],
],
],
'RequestId' => ['description' => '', 'type' => 'string', 'example' => 'A3F8DCAB-8301-5770-BD9F-71B0BF9E1A6E'],
],
],
],
400 => [],
500 => [],
],
'errorCodes' => [
400 => [
['errorCode' => '1001', 'errorMessage' => '测试错误码'],
],
500 => [
['errorCode' => '500', 'errorMessage' => '500'],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Success\\": true,\\n \\"Code\\": 0,\\n \\"Msg\\": \\"success\\",\\n \\"ExtMsg\\": \\"dddd\\",\\n \\"Module\\": [\\n {\\n \\"SequenceId\\": 1135434288,\\n \\"Biz\\": \\"CREATE\\",\\n \\"Content\\": \\"True\\",\\n \\"SendTime\\": \\"{\\\\\\\\\\\\\\"type\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"week\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"day\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"5\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"date\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"1\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"hour\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"18\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"month\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"1\\\\\\\\\\\\\\"}\\",\\n \\"HaveRedDot\\": true,\\n \\"UnReadCount\\": 111,\\n \\"ShowMsg\\": true\\n }\\n ],\\n \\"RequestId\\": \\"A3F8DCAB-8301-5770-BD9F-71B0BF9E1A6E\\"\\n}","type":"json"}]',
'requestParamsDescription' => 'GET /v1.0/oauth2/apps/authInfo?authCorpId=dingxxx HTTP/1.1'."\n"
."\n"
.'Host:api.dingtalk.com'."\n"
."\n"
.'x-acs-dingtalk-access-token:BExxx'."\n"
."\n"
.'Content-Type:application/json',
],
'TakeAccessToken' => [
'summary' => '获取accessToken',
'path' => '/btrip/open/access-token/take/{app_key}',
'methods' => ['get'],
'schemes' => ['https'],
'security' => [
[
'Anonymous' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'app_key',
'in' => 'path',
'schema' => ['description' => '', 'type' => 'string', 'required' => false, 'example' => '34j3df'],
],
[
'name' => 'app_secret',
'in' => 'query',
'schema' => ['description' => '', 'type' => 'string', 'required' => false, 'example' => 'affsgdfgsgsddg'],
],
],
'responses' => [
200 => [
'schema' => [
'title' => 'Schema of Response',
'description' => 'Schema of Response',
'type' => 'object',
'properties' => [
'requestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => '456456575656757'],
'code' => ['description' => '', 'type' => 'string', 'example' => 'System.Error'],
'message' => ['description' => '', 'type' => 'string', 'example' => ''],
'success' => ['description' => '', 'type' => 'string', 'example' => 'true'],
'data' => [
'description' => '',
'type' => 'object',
'properties' => [
'access_token' => ['description' => 'token', 'type' => 'string', 'example' => '32sfjge'],
'expire' => ['description' => '', 'type' => 'integer', 'format' => 'int64', 'example' => '70000'],
],
],
],
],
],
],
'errorCodes' => [
500 => [
['errorCode' => 'AccessToken.Application.Missing', 'errorMessage' => '找不到对应的应用'],
['errorCode' => 'AccessToken.AppSecret.Mismatching', 'errorMessage' => 'appSecret不正确'],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"requestId\\": \\"456456575656757\\",\\n \\"code\\": \\"System.Error\\",\\n \\"message\\": \\"系统错误\\",\\n \\"success\\": \\"true\\",\\n \\"data\\": {\\n \\"access_token\\": \\"32sfjge\\",\\n \\"expire\\": 70000\\n }\\n}","type":"json"}]',
'requestParamsDescription' => 'GET /v1.0/oauth2/apps/authInfo?authCorpId=String HTTP/1.1'."\n"
.'Host:api.dingtalk.com'."\n"
.'x-acs-dingtalk-access-token:String'."\n"
.'Content-Type:application/json',
],
],
'endpoints' => [],
];
|