From 103e72464e3758717bb64ebdd5818d32a2698492 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=88=98=E6=B4=AA=E9=9D=92?= Date: Mon, 14 Dec 2020 13:33:58 +0800 Subject: [PATCH] =?utf8?q?fix:=20=E6=9B=B4=E6=96=B0=E6=8E=88=E6=9D=83?= =?utf8?q?=E6=9C=8D=E5=8A=A1=EF=BC=8C=E5=BC=80=E6=94=BE=E6=8E=A5=E5=8F=A3y?= =?utf8?q?aml=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../user-authorization-service-poa.v1.yaml | 179 +++++++++++++----- 1 file changed, 129 insertions(+), 50 deletions(-) diff --git a/poa-api-docs/api-docs/user-authorization-service-poa.v1.yaml b/poa-api-docs/api-docs/user-authorization-service-poa.v1.yaml index c1be9d3..aa27cdf 100644 --- a/poa-api-docs/api-docs/user-authorization-service-poa.v1.yaml +++ b/poa-api-docs/api-docs/user-authorization-service-poa.v1.yaml @@ -142,11 +142,11 @@ paths: default: $ref: '#/components/responses/DefaultErrorResponse' - '/application/{applicationId}/roles/accounts': - post: - summary: 获取应用下的多个角色的用户帐号 - description: 获取应用下的多个角色的用户帐号 - operationId: loadAccountsByApplicationRole + '/application/{applicationId}/role/{rolecode}/groups': + get: + summary: 获取应用下的一个角色关联的用户组 + description: 获取应用下的一个角色关联的用户组 + operationId: loadApplicationRoleGroups tags: - Role security: @@ -159,6 +159,52 @@ paths: description: 应用标识 schema: type: string + - name: rolecode + in: path + required: true + description: 角色代码 + schema: + type: string + - name: groupType + in: path + required: false + description: 用户组类型(1 普通,2 岗位) + schema: + type: string + responses: + '200': + description: 角色关联的用户组列表 + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationRoleGroupsResponse' + default: + $ref: '#/components/responses/DefaultErrorResponse' + + + '/application/{applicationId}/externalRole/{externalId}/accounts': + get: + summary: 获取应用下的一个角色的用户帐号 + description: 获取应用下的一个角色的用户帐号 + operationId: loadAccountsByApplicationExternalRole + tags: + - Role + security: + - oauth2: + - "authz:v1:readRole" + parameters: + - name: applicationId + in: path + required: true + description: 应用标识 + schema: + type: string + - name: externalId + in: path + required: true + description: 应用内角色ID + schema: + type: string - name: loadAll in: query required: false @@ -182,32 +228,21 @@ paths: type: integer format: int32 default: 1000 - requestBody: - description: 角色ID - required: true - content: - application/json: - schema: - type: array - items: - title: 角色ID - type: string responses: '200': - description: 用户的帐号ID + description: 角色关联的帐号ID content: application/json: schema: - $ref: '#/components/schemas/ApplicationRolesAccountsResponse' + $ref: '#/components/schemas/ApplicationExternalRoleAccountsResponse' default: $ref: '#/components/responses/DefaultErrorResponse' - - '/application/{applicationId}/role/{rolecode}/groups': - get: - summary: 获取应用下的一个角色关联的用户组 - description: 获取应用下的一个角色关联的用户组 - operationId: loadApplicationRoleGroups + '/application/{applicationId}/externalRoles/accounts': + post: + summary: 获取应用下的多个角色的用户帐号 + description: 获取应用下的多个角色的用户帐号 + operationId: loadAccountsByApplicationExternalRoles tags: - Role security: @@ -220,25 +255,46 @@ paths: description: 应用标识 schema: type: string - - name: rolecode - in: path - required: true - description: 角色代码 + - name: loadAll + in: query + required: false + description: 分页-是否返回所有(当为 true 时,不分页,参数 pageIndex、pageSize 无效) schema: - type: string - - name: groupType - in: path + type: boolean + default: false + - name: pageIndex + in: query required: false - description: 用户组类型(1 普通,2 岗位) + description: 分页-页码 schema: - type: string + type: integer + format: int32 + default: 0 + - name: pageSize + in: query + required: false + description: 分页-每页记录数 + schema: + type: integer + format: int32 + default: 1000 + requestBody: + description: 应用内角色ID列表 + required: true + content: + application/json: + schema: + type: array + items: + title: 应用内角色ID + type: string responses: '200': - description: 角色关联的用户组列表 + description: 角色关联的帐号ID content: application/json: schema: - $ref: '#/components/schemas/ApplicationRoleGroupsResponse' + $ref: '#/components/schemas/ApplicationExternalRolesAccountsResponse' default: $ref: '#/components/responses/DefaultErrorResponse' @@ -512,7 +568,7 @@ components: $ref: '#/components/schemas/Role' - ApplicationRolesAccountsResponse: + ApplicationRoleGroupsResponse: allOf: - $ref: '#/components/schemas/DefaultApiResponse' - type: object @@ -526,12 +582,39 @@ components: applicationId: title: 应用标识 type: string - roleIds: - title: 角色IDs + rolecode: + title: 角色代码 + type: string + groupIds: + title: 用户组ID列表 type: array items: - title: 角色ID + title: 用户组ID type: string + groups: + title: 用户组列表 + type: array + items: + $ref: '#/components/schemas/GroupModel' + + + ApplicationExternalRoleAccountsResponse: + allOf: + - $ref: '#/components/schemas/DefaultApiResponse' + - type: object + title: 响应数据 + properties: + data: + allOf: + - type: object + title: 数据 + properties: + applicationId: + title: 应用标识 + type: string + externalId: + title: 应用内角色ID + type: string accounts: title: 用户帐号数据 type: array @@ -539,8 +622,7 @@ components: title: 用户的帐号ID type: string - - ApplicationRoleGroupsResponse: + ApplicationExternalRolesAccountsResponse: allOf: - $ref: '#/components/schemas/DefaultApiResponse' - type: object @@ -554,18 +636,15 @@ components: applicationId: title: 应用标识 type: string - rolecode: - title: 角色代码 - type: string - groupIds: - title: 用户组ID列表 + externalIds: + title: 应用内角色IDs type: array items: - title: 用户组ID + title: 角色ID type: string - groups: - title: 用户组列表 + accounts: + title: 用户帐号数据 type: array items: - $ref: '#/components/schemas/GroupModel' - + title: 用户的帐号ID + type: string -- 2.17.1