This repository has been archived on 2022-03-07. You can view files and clone it, but cannot push or open issues or pull requests.
hotpocket/scripts/schema/policy.yaml
2022-02-20 14:43:11 +00:00

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+$ } ]