openapi.yaml
6.71 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
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
openapi: 3.0.3
info:
title: MicroCommunity API
description: 微社区系统API接口文档
version: 1.0.0
contact:
name: MicroCommunity Team
url: https://github.com/java110/MicroCommunity
servers:
- url: http://localhost:8008
description: 开发环境
- url: https://api.microcommunity.com
description: 生产环境
paths:
/app/{service}:
parameters:
- name: service
in: path
required: true
schema:
type: string
description: 服务编码
post:
summary: 资源POST请求
description: 统一资源POST请求入口
operationId: servicePost
requestBody:
required: true
content:
application/json:
schema:
type: object
responses:
'200':
description: 成功
content:
application/json:
schema:
$ref: '#/components/schemas/ResultVo'
'500':
description: 服务器错误
get:
summary: 资源GET请求
description: 统一资源GET请求入口
operationId: serviceGet
responses:
'200':
description: 成功
content:
application/json:
schema:
$ref: '#/components/schemas/ResultVo'
put:
summary: 资源PUT请求
description: 统一资源PUT请求入口
operationId: servicePut
requestBody:
required: true
content:
application/json:
schema:
type: object
responses:
'200':
description: 成功
delete:
summary: 资源DELETE请求
description: 统一资源DELETE请求入口
operationId: serviceDelete
responses:
'200':
description: 成功
/app/{resource}/{action}:
parameters:
- name: resource
in: path
required: true
schema:
type: string
description: 资源类型
- name: action
in: path
required: true
schema:
type: string
description: 操作类型
get:
summary: 子资源GET请求
description: 子资源GET请求入口
operationId: subServiceGet
responses:
'200':
description: 成功
post:
summary: 子资源POST请求
description: 子资源POST请求入口
operationId: subServicePost
requestBody:
required: true
content:
application/json:
schema:
type: object
responses:
'200':
description: 成功
/app/loginOwner:
post:
summary: 业主登录
description: 业主账号密码登录
operationId: loginOwner
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
password:
type: string
responses:
'200':
description: 登录成功
content:
application/json:
schema:
$ref: '#/components/schemas/LoginResult'
/app/loginOwnerByKey:
post:
summary: 业主密钥登录
description: 使用密钥登录系统
operationId: loginOwnerByKey
requestBody:
required: true
content:
application/json:
schema:
type: object
responses:
'200':
description: 登录成功
/app/loginWx:
post:
summary: 微信登录
description: 微信小程序登录
operationId: loginWx
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
code:
type: string
userInfo:
type: object
responses:
'200':
description: 登录成功
/app/loginOwnerWechatAuth:
get:
summary: 微信授权登录
description: 微信公众号授权登录
operationId: loginOwnerWechatAuth
parameters:
- name: appId
in: query
required: true
schema:
type: string
responses:
'200':
description: 授权成功
/app/loginStaffWechatAuth:
get:
summary: 员工微信授权
description: 员工微信授权登录
operationId: loginStaffWechatAuth
parameters:
- name: appId
in: query
required: true
schema:
type: string
responses:
'200':
description: 授权成功
/app/staffAuth:
get:
summary: 员工鉴权
description: 员工权限验证
operationId: staffAuth
parameters:
- name: communityId
in: query
required: true
schema:
type: string
- name: staffId
in: query
required: true
schema:
type: string
- name: storeId
in: query
required: true
schema:
type: string
- name: appId
in: query
required: true
schema:
type: string
responses:
'200':
description: 鉴权成功
/app/getWxPhoto:
post:
summary: 获取微信照片
description: 获取微信用户照片信息
operationId: getWxPhoto
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
decryptData:
type: string
key:
type: string
iv:
type: string
responses:
'200':
description: 成功获取
components:
schemas:
ResultVo:
type: object
properties:
code:
type: string
description: 返回码
msg:
type: string
description: 返回消息
data:
type: object
description: 返回数据
LoginResult:
type: object
properties:
code:
type: string
example: "0"
msg:
type: string
example: "成功"
data:
type: object
properties:
token:
type: string
description: 认证令牌
userId:
type: string
description: 用户ID
userName:
type: string
description: 用户名
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
security:
- BearerAuth: []