From 712b2cdfc849c7d9f496373e5bf3dd7c10b0a189 Mon Sep 17 00:00:00 2001 From: Trevor Pering Date: Mon, 4 Apr 2022 14:56:53 -0700 Subject: [PATCH] Cleaning up example --- tests/state.tests/errors.json | 7 ++++++- tests/state.tests/errors.out | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/state.tests/errors.json b/tests/state.tests/errors.json index 63076f171..12833042b 100644 --- a/tests/state.tests/errors.json +++ b/tests/state.tests/errors.json @@ -1,5 +1,10 @@ +// +// This file contains an intentionally invalid status message, intended +// to make sure that the validator is catching the necessary errors. +// This is NOT an example of how to report errors :-/. +// { - "version": 2, + "version": 1, "timestamp": "2018-08-26T21:39:29.364Z", "id": "monkey_brains", "system": { diff --git a/tests/state.tests/errors.out b/tests/state.tests/errors.out index a9a6aaacb..4a694b508 100644 --- a/tests/state.tests/errors.out +++ b/tests/state.tests/errors.out @@ -1 +1,6 @@ -Starting major version 2 +6 schema violations found + instance type (string) does not match any allowed primitive type (allowed: ["object"]) + object has missing required properties (["hardware","last_config","operational","serial_no","software"]) + object instance has properties which are not allowed by the schema: ["cov_increment","deadband","high_limit","instance_number","low_limit","object_type","rapt","resolution"] + object instance has properties which are not allowed by the schema: ["device_id","device_status","fling","object_name","system_status"] + object instance has properties which are not allowed by the schema: ["id","status"]