commit 7a4d36f814316ab2e788f88c243434ba44afc270
parent 700b243620b17a05973f35b95688d7618065dd14
Author: Juan F. Meleiro <juan@juanmeleiro.mat.br>
Date: Wed, 5 Feb 2025 16:09:37 -0300
Add a JSON schema for the absurdor log
Diffstat:
1 file changed, 57 insertions(+), 0 deletions(-)
diff --git a/specs/absurdor.log.schema.json b/specs/absurdor.log.schema.json
@@ -0,0 +1,56 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/vocab/validation",
+ "$vocabulary": {
+ "https://json-schema.org/draft/2020-12/vocab/validation": true
+ },
+ "$id": "http://juanmeleiro.mat.br/agora/specs/absurdor.log.schema.json",
+ "$ref": "http://juanmeleiro.mat.br/agora/specs/log.schema.json",
+ "items": {
+ "type": "object",
+ "oneOf": [
+ {
+ "properties": {
+ "what": {
+ "const": "devalue"
+ }
+ },
+ "required": ["value", "who"]
+ },
+ {
+ "properties": {
+ "what": {
+ "const": "push"
+ }
+ },
+ "required": ["who"]
+ },
+ {
+ "properties": {
+ "what": {
+ "const": "report"
+ }
+ },
+ "required": ["height"],
+ "if": {
+ "properties": {
+ "when": {
+ "$comment": "This value does not, but SHOULD correspond to the timestamp when the rule creating the Veblen was enacted.",
+ "minimum": 1722280733
+ }
+ }
+ },
+ "then": {
+ "required": ["cost"]
+ }
+ },
+ {
+ "properties": {
+ "what": {
+ "const": "transfer"
+ }
+ },
+ "required": ["payed", "who"]
+ }
+ ]
+ }
+}
+\ No newline at end of file