github.com/mmatczuk/gohan@v0.0.0-20170206152520-30e45d9bdb69/examples/noauth/example_schema.yaml (about)

     1  extensions: []
     2  policies:
     3  - id: no_auth_favicon
     4    action: '*'
     5    principal: Nobody
     6    resource:
     7      path: /favicon.ico
     8  - id: no_auth_member_resources
     9    action: '*'
    10    principal: Nobody
    11    resource:
    12      path: /v0.1/member_resources*
    13  - action: read
    14    effect: allow
    15    id: member_schema
    16    principal: Member
    17    resource:
    18      path: /v0.1/schemas*
    19  - action: '*'
    20    condition:
    21    - is_owner
    22    effect: allow
    23    id: member_policy
    24    principal: Member
    25    resource:
    26      path: /v0.1/member_resources*
    27      properties:
    28      - id
    29      - name
    30      - description
    31      - tenant_id
    32  - action: '*'
    33    condition:
    34    - is_owner
    35    effect: allow
    36    id: member_policy
    37    principal: Member
    38    resource:
    39      path: /v0.1/member_resources*
    40      properties:
    41      - id
    42      - name
    43      - description
    44      - tenant_id
    45  schemas:
    46  - description: Resource for member
    47    id: member_resource
    48    plural: member_resources
    49    prefix: /v0.1
    50    schema:
    51      properties:
    52        description:
    53          description: Description
    54          permission:
    55          - create
    56          - update
    57          title: Description
    58          type: string
    59        id:
    60          description: ID
    61          permission:
    62          - create
    63          title: ID
    64          type: string
    65          view:
    66          - detail
    67        name:
    68          description: Name
    69          permission:
    70          - create
    71          - update
    72          title: Name
    73          type: string
    74        tenant_id:
    75          description: Tenant ID
    76          permission:
    77          - create
    78          title: Tenant ID
    79          type: string
    80          view:
    81          - detail
    82        admin_property:
    83          description: Admin Only property
    84          permission:
    85          - create
    86          - update
    87          title: Admin Only Property
    88          type: string
    89          view:
    90          - list
    91          - create
    92          - update
    93          - detail
    94      propertiesOrder:
    95      - id
    96      - name
    97      - description
    98      - tenant_id
    99      - admin_property
   100      required: []
   101      type: object
   102    singular: member_resource
   103    title: Member Resource
   104  - description: Users who has admin only can take a look this
   105    id: admin_only_resource
   106    plural: admin_only_resources
   107    prefix: /v0.1
   108    schema:
   109      properties:
   110        description:
   111          description: Description
   112          permission:
   113          - create
   114          - update
   115          title: Description
   116          type: string
   117        id:
   118          description: ID
   119          permission:
   120          - create
   121          title: ID
   122          type: string
   123          view:
   124          - detail
   125        name:
   126          description: Name
   127          permission:
   128          - create
   129          - update
   130          title: Name
   131          type: string
   132        tenant_id:
   133          description: Tenant ID
   134          permission:
   135          - create
   136          title: Tenant ID
   137          type: string
   138          view:
   139          - detail
   140      propertiesOrder:
   141      - id
   142      - name
   143      - description
   144      - tenant_id
   145      required: []
   146      type: object
   147    singular: admin_only_resource
   148    title: Admin Only Resource