29 lines
759 B
YAML
29 lines
759 B
YAML
title: policy.yaml
|
|
type: object
|
|
required: [ signature, rules ]
|
|
properties:
|
|
signature:
|
|
type: string
|
|
rules:
|
|
type: array
|
|
items:
|
|
type: object
|
|
required: [ type, entity ]
|
|
allOf:
|
|
- oneOf:
|
|
- properties:
|
|
type: { type: string, const: m.room }
|
|
entity: { type: string, pattern: '^![\w\-]+:.+$' }
|
|
- properties:
|
|
type: { type: string, const: m.user }
|
|
entity: { type: string, pattern: '^@[\w\-]+:.+$' }
|
|
- oneOf:
|
|
- required: [ tag ]
|
|
properties:
|
|
tag: { type: string, pattern: ^\w+$ }
|
|
- required: [ tags ]
|
|
properties:
|
|
tags:
|
|
type: array
|
|
items: [ { type: string, pattern: ^\w+$ } ]
|