From bd15b947d7098cbe56e75a7a490141237a5e0fa8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=88=98=E6=B4=AA=E9=9D=92?= Date: Thu, 5 Nov 2020 16:14:07 +0800 Subject: [PATCH] =?utf8?q?docs:=20poa=20=E6=96=87=E6=A1=A3=EF=BC=8C?= =?utf8?q?=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=A3=EF=BC=9A=E8=8E=B7=E5=8F=96?= =?utf8?q?=E5=BA=94=E7=94=A8=E4=B8=8B=E7=9A=84=E4=B8=80=E4=B8=AA=E8=A7=92?= =?utf8?q?=E8=89=B2=E5=85=B3=E8=81=94=E7=9A=84=E7=94=A8=E6=88=B7=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../user-authorization-service-poa.v1.yaml | 122 +++++++++++++++++- 1 file changed, 117 insertions(+), 5 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 236e049..c7f4b87 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 @@ -1,16 +1,16 @@ # user-authorization-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": "authz", "origin": "http://user-authorization-poa-svc.user-authorization-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": "authz", "origin": "http://user-authorization-poa-svc.user-authorization-service.svc.cluster.local:8080", "name": "授权服务", "description": "授权服务"}' # # 2. 创建版本 -# curl -i -s -X POST 'https://poa-sa.dev.supwisdom.com/v1/services/authz/apiVersions/v1' +# curl -i -s -X POST 'https://poa-sa.supwisdom.com/v1/services/authz/apiVersions/v1' # # 3. 上传OAS Yaml -# curl -i -s -X POST 'https://poa-sa.dev.supwisdom.com/v1/services/authz/apiVersions/v1/apiSpecs' -H 'Content-Type: application/yaml' --data-binary @user-authorization-service-poa.v1.yaml +# curl -i -s -X POST 'https://poa-sa.supwisdom.com/v1/services/authz/apiVersions/v1/apiSpecs' -H 'Content-Type: application/yaml' --data-binary @user-authorization-service-poa.v1.yaml # # 4. 发布版本 -# curl -i -s -X POST 'https://poa-sa.dev.supwisdom.com/v1/services/authz/apiVersions/v1/publish' +# curl -i -s -X POST 'https://poa-sa.supwisdom.com/v1/services/authz/apiVersions/v1/publish' # openapi: 3.0.2 info: @@ -183,7 +183,7 @@ paths: format: int32 default: 1000 requestBody: - description: 角色IDs + description: 角色ID required: true content: application/json: @@ -202,6 +202,47 @@ paths: default: $ref: '#/components/responses/DefaultErrorResponse' + + '/application/{applicationId}/role/{rolecode}/groups': + get: + summary: 获取应用下的一个角色关联的用户组 + description: 获取应用下的一个角色关联的用户组 + operationId: loadApplicationRoleGroups + tags: + - Role + security: + - oauth2: + - "authz:v1:readRole" + parameters: + - name: applicationId + in: path + required: true + 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' + + components: # Security Schemes @@ -310,6 +351,9 @@ components: - type: object title: 实体属性 properties: + applicationId: + title: 所属应用 + type: string code: title: 代码 type: string @@ -326,6 +370,43 @@ components: title: 扩展ID type: string + + GroupModel: + title: 模型 - 用户组 + allOf: + - type: object + title: 实体属性 + properties: + id: + title: ID + type: string + applicationId: + title: 所属应用 + type: string + code: + title: 代码 + type: string + name: + title: 名称 + type: string + description: + title: 描述 + type: string + type: + title: 类型,1 普通用户组,2 岗位用户组 + type: string + state: + title: 状态,0:正常 1:冻结 2:注销 + type: integer + format: int32 + sort: + title: 排序 + type: integer + format: int32 + common: + title: 是否公共 + type: boolean + # Request VO @@ -457,3 +538,34 @@ components: items: title: 用户的帐号ID type: string + + + ApplicationRoleGroupsResponse: + allOf: + - $ref: '#/components/schemas/DefaultApiResponse' + - type: object + title: 响应数据 + properties: + data: + allOf: + - type: object + title: 数据 + properties: + applicationId: + title: 应用标识 + type: string + rolecode: + title: 角色代码 + type: string + groupIds: + title: 用户组ID列表 + type: array + items: + title: 用户组ID + type: string + groups: + title: 用户组列表 + type: array + items: + $ref: '#/components/schemas/GroupModel' + -- 2.17.1