role.yaml 865 字节
version: v1
kind: HttpApi
metadata:
  service: role
  path: /roles
  endpoints: 
  - method: createRole
    route:
      post: /  
  - method: updateRole
    route:
      put: /{roleId}
  - method: getRole
    route:
      get: /{roleId}
  - method: removeRole
    route:
      delete: /{roleId}
  - method: listRole
    route:
      get: /
    params:
      - name: offset
      - name: limit
  - method: getRoleRelatedUsers
    route:
      get: /{roleId}/related-users
    params:
      - name: roleId
      - name: orgId
      - name: departmentId
  - method: getRoleAccessMenus
    route:
      get: /{roleId}/access-menus
    params:
      - name: roleId
  - method: updateRoleAccessMenus
    route:
      put: /{roleId}/access-menus
  - method: assginRoleToUsers
    route:
      post: /assgin
  - method: unAssginRoleToUsers
    route:
      post: /unassgin