feat: 更新云平台开放接口,升级版本号 1.1.0-SNAPSHOT
author刘洪青 <loie.engine@gmail.com>
Fri, 2 Oct 2020 13:58:21 +0000 (21:58 +0800)
committer刘洪青 <loie.engine@gmail.com>
Fri, 2 Oct 2020 13:58:21 +0000 (21:58 +0800)
poa-api-docs/api-docs/admin-center-poa.v1.yaml
poa-api-docs/docker-build.sh

index 6627c51..d44c849 100644 (file)
@@ -23,6 +23,8 @@ servers:
 tags:
   - name: Menu
     description: '管理中心菜单'
+  - name: Permission
+    description: '云平台权限'
 paths:
 
   '/menus/accountName/{accountName}/menus':
@@ -59,6 +61,140 @@ paths:
           $ref: '#/components/responses/DefaultErrorResponse'
 
 
+  '/permissions/accountName/{accountName}/permissions':
+    get:
+      summary: 获取用户帐号拥有的权限
+      description: 获取用户帐号拥有的权限
+      operationId: loadAccountPermissions
+      tags:
+        - Permission
+      security:
+        - oauth2:
+          - "admincenter:v1:readAdminCenterPermission"
+      parameters:
+        - name: accountName
+          in: path
+          required: true
+          description: 用户名
+          schema:
+            type: string
+        - name: applicationId
+          in: query
+          required: false
+          description: 应用标识
+          schema:
+            type: string
+      responses:
+        '200':
+          description: 权限(菜单、操作、资源)列表
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/GrantedPermissionsResponse'
+        default:
+          $ref: '#/components/responses/DefaultErrorResponse'
+
+
+  '/permissions/accountName/{accountName}/menus':
+    get:
+      summary: 获取用户帐号拥有的菜单
+      description: 获取用户帐号拥有的菜单
+      operationId: loadAccountPermissionMenus
+      tags:
+        - Permission
+      security:
+        - oauth2:
+          - "admincenter:v1:readAdminCenterPermission"
+      parameters:
+        - name: accountName
+          in: path
+          required: true
+          description: 用户名
+          schema:
+            type: string
+        - name: applicationId
+          in: query
+          required: false
+          description: 应用标识
+          schema:
+            type: string
+      responses:
+        '200':
+          description: 权限(菜单)列表
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/GrantedMenusResponse'
+        default:
+          $ref: '#/components/responses/DefaultErrorResponse'
+
+  '/permissions/accountName/{accountName}/operations':
+    get:
+      summary: 获取用户帐号拥有的操作
+      description: 获取用户帐号拥有的操作
+      operationId: loadAccountPermissionOperations
+      tags:
+        - Permission
+      security:
+        - oauth2:
+          - "admincenter:v1:readAdminCenterPermission"
+      parameters:
+        - name: accountName
+          in: path
+          required: true
+          description: 用户名
+          schema:
+            type: string
+        - name: applicationId
+          in: query
+          required: false
+          description: 应用标识
+          schema:
+            type: string
+      responses:
+        '200':
+          description: 权限(操作)列表
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/GrantedOperationsResponse'
+        default:
+          $ref: '#/components/responses/DefaultErrorResponse'
+
+  '/permissions/accountName/{accountName}/resources':
+    get:
+      summary: 获取用户帐号拥有的资源
+      description: 获取用户帐号拥有的资源
+      operationId: loadAccountPermissionResources
+      tags:
+        - Permission
+      security:
+        - oauth2:
+          - "admincenter:v1:readAdminCenterPermission"
+      parameters:
+        - name: accountName
+          in: path
+          required: true
+          description: 用户名
+          schema:
+            type: string
+        - name: applicationId
+          in: query
+          required: false
+          description: 应用标识
+          schema:
+            type: string
+      responses:
+        '200':
+          description: 菜单列表
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/GrantedResourcesResponse'
+        default:
+          $ref: '#/components/responses/DefaultErrorResponse'
+
+
 components:
 
   # Security Schemes
@@ -71,6 +207,7 @@ components:
           tokenUrl: ${POA_SERVER_URL}/oauth2/token
           scopes:
             "admincenter:v1:readMenu": "读取后台菜单"
+            "admincenter:v1:readAdminCenterPermission": "读取权限"
 
   responses:
     'ErrorResponse400':
@@ -128,6 +265,12 @@ components:
         status:
           title: 状态(1 启用,0 停用)
           type: string
+        applicationId:
+          title: 系统ID
+          type: string
+        parentId:
+          title: 父级ID
+          type: string
         icon:
           title: 菜单图标
           type: string
@@ -137,6 +280,30 @@ components:
         url:
           title: URL地址
           type: string
+        order:
+          title: 排序
+          type: integer
+          format: int32
+
+    GrantedOperation:
+      title: DTO - 操作数据
+      type: object
+      properties:
+        id:
+          title: ID
+          type: string
+        code:
+          title: 代码
+          type: string
+        name:
+          title: 名称
+          type: string
+        memo:
+          title: 备注
+          type: string
+        status:
+          title: 状态(1 启用,0 停用)
+          type: string
         applicationId:
           title: 系统ID
           type: string
@@ -145,6 +312,42 @@ components:
           type: string
         order:
           title: 排序
+          type: integer
+          format: int32
+
+    GrantedResource:
+      title: DTO - 资源数据
+      type: object
+      properties:
+        id:
+          title: ID
+          type: string
+        code:
+          title: 代码
+          type: string
+        name:
+          title: 名称
+          type: string
+        memo:
+          title: 备注
+          type: string
+        status:
+          title: 状态(1 启用,0 停用)
+          type: string
+        applicationId:
+          title: 系统ID
+          type: string
+        origin:
+          title: 来源系统
+          type: string
+        method:
+          title: 请求方式(GET、POST、PUT、DELETE 等)
+          type: string
+        path:
+          title: 请求路径
+          type: string
+        access:
+          title: 访问规则(匿名访问anonymous、认证访问authenticate、授权访问authorize、允许所有permitAll、拒绝所有denyAll)
           type: string
 
 
@@ -163,6 +366,46 @@ components:
           items:
             $ref: '#/components/schemas/GrantedMenu'
 
+    GrantedOperationsResponseData:
+      title: 响应数据 - 操作列表
+      type: object
+      properties:
+        operations:
+          title: 操作列表
+          type: array
+          items:
+            $ref: '#/components/schemas/GrantedOperation'
+
+    GrantedResourcesResponseData:
+      title: 响应数据 - 资源列表
+      type: object
+      properties:
+        resource:
+          title: 资源列表
+          type: array
+          items:
+            $ref: '#/components/schemas/GrantedResource'
+
+    GrantedPermissionsResponseData:
+      title: 响应数据 - 权限列表
+      type: object
+      properties:
+        menus:
+          title: 菜单列表
+          type: array
+          items:
+            $ref: '#/components/schemas/GrantedMenu'
+        operations:
+          title: 操作列表
+          type: array
+          items:
+            $ref: '#/components/schemas/GrantedOperation'
+        resource:
+          title: 资源列表
+          type: array
+          items:
+            $ref: '#/components/schemas/GrantedResource'
+
 
     # Response VO
 
@@ -200,3 +443,33 @@ components:
             data:
               allOf:
                 - $ref: '#/components/schemas/GrantedMenusResponseData'
+
+    GrantedOperationsResponse:
+      allOf:
+        - $ref: '#/components/schemas/DefaultApiDataResponse'
+        - type: object
+          title: 响应
+          properties:
+            data:
+              allOf:
+                - $ref: '#/components/schemas/GrantedOperationsResponseData'
+
+    GrantedResourcesResponse:
+      allOf:
+        - $ref: '#/components/schemas/DefaultApiDataResponse'
+        - type: object
+          title: 响应
+          properties:
+            data:
+              allOf:
+                - $ref: '#/components/schemas/GrantedResourcesResponseData'
+
+    GrantedPermissionsResponse:
+      allOf:
+        - $ref: '#/components/schemas/DefaultApiDataResponse'
+        - type: object
+          title: 响应
+          properties:
+            data:
+              allOf:
+                - $ref: '#/components/schemas/GrantedPermissionsResponseData'
index 58b4cc6..f9beb20 100755 (executable)
@@ -8,7 +8,7 @@ IMAGE_SERVER="harbor.supwisdom.com"
 IMAGE_PREFIX="authx-service"
 
 NAME="poa-api-docs-installer"
-VERSION="1.0.0-SNAPSHOT"
+VERSION="1.1.0-SNAPSHOT"
 
 
 function build