范围的布尔运算

时间:2018-01-05 14:15:27

标签: swagger swagger-2.0

我想用我的安全范围OAS3做类似的事情,以表明(user:write & user:read) | user:admin

等权限
/user:
  post:
    responses:
      '200':
        description: Successful operation
    security:
      - app_auth:
        - or:
          - 'user:admin'
          - and:
            - 'user:write'
            - 'user:read'

这可能吗?

1 个答案:

答案 0 :(得分:1)

这可以定义为:

      security:
        - app_auth:
          - 'user:admin'
        - app_auth:
          - 'user:write'
          - 'user:read'