From: 刘洪青 Date: Mon, 19 Oct 2020 12:00:04 +0000 (+0800) Subject: fix: 更新用户服务的poa api 文档 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=61e6373213cfb6c52a7ec08dd86dce136ee85072;p=institute%2Fdeploy-authx-service.git fix: 更新用户服务的poa api 文档 --- diff --git a/poa-api-docs/api-docs/user-data-service-poa.v1.yaml b/poa-api-docs/api-docs/user-data-service-poa.v1.yaml index c59e26d..1d7f77e 100644 --- a/poa-api-docs/api-docs/user-data-service-poa.v1.yaml +++ b/poa-api-docs/api-docs/user-data-service-poa.v1.yaml @@ -1,16 +1,17 @@ # user-data-service-poa.v1.yaml # # 1. 创建服务 -# curl -i -s -X POST 'https://poa-sa.dev.supwisdom.com/v1/services' -H 'Content-Type: application/json' -d '{"id": "user", "origin": "http://user-data-service-poa-svc.user-data-service.svc.cluster.local:8080", "name": "用户服务", "description": "用户服务"}' +# curl -i -s -X POST 'https://poa-sa.supwisdom.com/v1/services' -H 'Content-Type: application/json' -d '{"id": "user", "origin": "https://user-api.supwisdom.com", "name": "用户服务", "description": "用户服务"}' +# http://user-data-service-poa-svc.user-data-service.svc.cluster.local:8080 # # 2. 创建版本 -# curl -i -s -X POST 'https://poa-sa.dev.supwisdom.com/v1/services/user/apiVersions/v1' +# curl -i -s -X POST 'https://poa-sa.supwisdom.com/v1/services/user/apiVersions/v1' # # 3. 上传OAS Yaml -# curl -i -s -X POST 'https://poa-sa.dev.supwisdom.com/v1/services/user/apiVersions/v1/apiSpecs' -H 'Content-Type: application/yaml' --data-binary @user-data-service-poa.v1.yaml +# curl -i -s -X POST 'https://poa-sa.supwisdom.com/v1/services/user/apiVersions/v1/apiSpecs' -H 'Content-Type: application/yaml' -d 'yaml content' # # 4. 发布版本 -# curl -i -s -X POST 'https://poa-sa.dev.supwisdom.com/v1/services/user/apiVersions/v1/publish' +# curl -i -s -X POST 'https://poa-sa.supwisdom.com/v1/services/user/apiVersions/v1/publish' # openapi: 3.0.2 info: @@ -19,7 +20,7 @@ info: description: '用户服务 - 平台开放接口' servers: - url: '${POA_SERVER_URL}/apis/user/v1' - description: '正式环境' + description: '演示环境' tags: - name: User description: '用户' @@ -96,6 +97,110 @@ paths: default: $ref: '#/components/responses/DefaultErrorResponse' + '/users/newPage': + get: + summary: 获取用户列表(不计算totalCount) + operationId: pageUsersNew + tags: + - User + security: + - oauth2: + - "user:v1:readUser" + parameters: + - name: pageIndex + in: query + required: true + description: 分页-页码 + schema: + type: integer + format: int32 + default: 0 + - name: pageSize + in: query + required: true + description: 分页-每页记录数 + schema: + type: integer + format: int32 + default: 20 + - name: mapBean + in: query + required: false + description: 查询条件 + style: deepObject + explode: true + schema: + type: object + properties: + keyword: + title: 查询条件 - 关键字(模糊,帐号、姓名等) + type: string + accountName: + title: 查询条件 - 账户名(模糊) + type: string + name: + title: 查询条件 - 姓名(模糊) + type: string + ids: + title: 查询条件 - ids(精确匹配,多个用逗号隔开) + type: string + accountNames: + title: 查询条件 - 账户名s(精确匹配,多个用逗号隔开) + type: string + responses: + '200': + description: 用户分页列表 + content: + application/json: + schema: + $ref: '#/components/schemas/UserInfoPageResponse' + default: + $ref: '#/components/responses/DefaultErrorResponse' + + '/users/totalCount': + get: + summary: 根据查询条件得到用户数量 + operationId: totalCount + tags: + - User + security: + - oauth2: + - "user:v1:readUser" + parameters: + - name: mapBean + in: query + required: false + description: 查询条件 + style: deepObject + explode: true + schema: + type: object + properties: + keyword: + title: 查询条件 - 关键字(模糊,帐号、姓名等) + type: string + accountName: + title: 查询条件 - 账户名(模糊) + type: string + name: + title: 查询条件 - 姓名(模糊) + type: string + ids: + title: 查询条件 - ids(精确匹配,多个用逗号隔开) + type: string + accountNames: + title: 查询条件 - 账户名s(精确匹配,多个用逗号隔开) + type: string + responses: + '200': + description: 用户数量 + content: + application/json: + schema: + $ref: '#/components/schemas/UserTotalCountResponse' + default: + $ref: '#/components/responses/DefaultErrorResponse' + '/users/{accountId}': get: summary: 根据帐号ID获取用户信息 @@ -2551,6 +2656,22 @@ components: items: $ref: '#/components/schemas/UserInfoModel' + UserTotalCountResponse: + allOf: + - $ref: '#/components/schemas/DefaultApiResponse' + - type: object + title: 响应数据 + properties: + data: + allOf: + - type: object + title: 结果 + properties: + totalCount: + title: 用户总数 + type: integer + format: int32 + UserInfoLoadResponse: allOf: - $ref: '#/components/schemas/DefaultApiResponse'