From 98345aaf154e68d49acdf482e79edc45ab7f04aa Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Mon, 28 Aug 2023 10:16:37 +0100 Subject: [PATCH] Include documentation url inside JSON Schema (#574) Adding a link to official documentation inside JSON Schema, so its users, such ansible-lint can recommend it when validation fails. Needed-By: https://github.com/ansible/ansible-lint/pull/3684 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- ansible_rulebook/schema/ruleset_schema.json | 2 ++ tests/examples/replays/23_nested_data/01.json | 2 +- tests/examples/replays/23_nested_data/02.json | 2 +- tests/examples/replays/23_nested_data/03.json | 2 +- tests/examples/replays/23_nested_data/04.json | 2 +- tests/examples/replays/23_nested_data/05.json | 2 +- tests/examples/replays/23_nested_data/06.json | 2 +- tests/examples/replays/23_nested_data/07.json | 2 +- tests/examples/replays/23_nested_data/08.json | 2 +- tests/examples/replays/23_nested_data/09.json | 2 +- tests/examples/replays/24_max_attributes/00.json | 2 +- tests/examples/replays/25_max_attributes_nested/00.json | 2 +- tests/sources/replays/01.json | 4 +++- tests/sources/replays/02.json | 4 +++- tests/sources/replays/03.json | 4 +++- tests/sources/replays/04.json | 4 +++- tests/sources/replays/05.json | 4 +++- 17 files changed, 28 insertions(+), 16 deletions(-) diff --git a/ansible_rulebook/schema/ruleset_schema.json b/ansible_rulebook/schema/ruleset_schema.json index 308bcf39..78e8d1ca 100644 --- a/ansible_rulebook/schema/ruleset_schema.json +++ b/ansible_rulebook/schema/ruleset_schema.json @@ -1,6 +1,8 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://raw.githubusercontent.com/ansible/ansible-rulebook/main/ansible_rulebook/schema/ruleset_schema.json", + "title": "Ansible Rulebook", + "description": "See https://ansible.readthedocs.io/projects/rulebook/en/stable/rulebooks.html", "type": "array", "items": { "$ref": "#/$defs/ruleset" diff --git a/tests/examples/replays/23_nested_data/01.json b/tests/examples/replays/23_nested_data/01.json index f9f81910..4d6dcef9 100644 --- a/tests/examples/replays/23_nested_data/01.json +++ b/tests/examples/replays/23_nested_data/01.json @@ -4,4 +4,4 @@ "i": 1 } } -} \ No newline at end of file +} diff --git a/tests/examples/replays/23_nested_data/02.json b/tests/examples/replays/23_nested_data/02.json index fc9f6f06..2937ce69 100644 --- a/tests/examples/replays/23_nested_data/02.json +++ b/tests/examples/replays/23_nested_data/02.json @@ -4,4 +4,4 @@ "i": 2 } } -} \ No newline at end of file +} diff --git a/tests/examples/replays/23_nested_data/03.json b/tests/examples/replays/23_nested_data/03.json index 30d245d2..c6e62509 100644 --- a/tests/examples/replays/23_nested_data/03.json +++ b/tests/examples/replays/23_nested_data/03.json @@ -4,4 +4,4 @@ "i": 3 } } -} \ No newline at end of file +} diff --git a/tests/examples/replays/23_nested_data/04.json b/tests/examples/replays/23_nested_data/04.json index dfc18b36..dd4cb236 100644 --- a/tests/examples/replays/23_nested_data/04.json +++ b/tests/examples/replays/23_nested_data/04.json @@ -4,4 +4,4 @@ "i": 4 } } -} \ No newline at end of file +} diff --git a/tests/examples/replays/23_nested_data/05.json b/tests/examples/replays/23_nested_data/05.json index cb0fe484..66b894ed 100644 --- a/tests/examples/replays/23_nested_data/05.json +++ b/tests/examples/replays/23_nested_data/05.json @@ -4,4 +4,4 @@ "i": 5 } } -} \ No newline at end of file +} diff --git a/tests/examples/replays/23_nested_data/06.json b/tests/examples/replays/23_nested_data/06.json index d8241590..39332d51 100644 --- a/tests/examples/replays/23_nested_data/06.json +++ b/tests/examples/replays/23_nested_data/06.json @@ -4,4 +4,4 @@ "i": 6 } } -} \ No newline at end of file +} diff --git a/tests/examples/replays/23_nested_data/07.json b/tests/examples/replays/23_nested_data/07.json index 8c3bbd6f..0d5becd6 100644 --- a/tests/examples/replays/23_nested_data/07.json +++ b/tests/examples/replays/23_nested_data/07.json @@ -4,4 +4,4 @@ "i": 7 } } -} \ No newline at end of file +} diff --git a/tests/examples/replays/23_nested_data/08.json b/tests/examples/replays/23_nested_data/08.json index 69e09e9d..9d16a38c 100644 --- a/tests/examples/replays/23_nested_data/08.json +++ b/tests/examples/replays/23_nested_data/08.json @@ -4,4 +4,4 @@ "i": 8 } } -} \ No newline at end of file +} diff --git a/tests/examples/replays/23_nested_data/09.json b/tests/examples/replays/23_nested_data/09.json index 9cf674d9..c28f3974 100644 --- a/tests/examples/replays/23_nested_data/09.json +++ b/tests/examples/replays/23_nested_data/09.json @@ -4,4 +4,4 @@ "i": 9 } } -} \ No newline at end of file +} diff --git a/tests/examples/replays/24_max_attributes/00.json b/tests/examples/replays/24_max_attributes/00.json index a4169976..d2d24386 100644 --- a/tests/examples/replays/24_max_attributes/00.json +++ b/tests/examples/replays/24_max_attributes/00.json @@ -249,4 +249,4 @@ "attr_97": 97, "attr_98": 98, "attr_99": 99 -} \ No newline at end of file +} diff --git a/tests/examples/replays/25_max_attributes_nested/00.json b/tests/examples/replays/25_max_attributes_nested/00.json index 65d68a60..80a8c294 100644 --- a/tests/examples/replays/25_max_attributes_nested/00.json +++ b/tests/examples/replays/25_max_attributes_nested/00.json @@ -158,4 +158,4 @@ } } } -} \ No newline at end of file +} diff --git a/tests/sources/replays/01.json b/tests/sources/replays/01.json index 068ba35c..d7657c2c 100644 --- a/tests/sources/replays/01.json +++ b/tests/sources/replays/01.json @@ -1 +1,3 @@ -{"i": 0} +{ + "i": 0 +} diff --git a/tests/sources/replays/02.json b/tests/sources/replays/02.json index 5fb4921e..f26a8d58 100644 --- a/tests/sources/replays/02.json +++ b/tests/sources/replays/02.json @@ -1 +1,3 @@ -{"i": 1} +{ + "i": 1 +} diff --git a/tests/sources/replays/03.json b/tests/sources/replays/03.json index 22a9a2b6..bf89655d 100644 --- a/tests/sources/replays/03.json +++ b/tests/sources/replays/03.json @@ -1 +1,3 @@ -{"i": 2} +{ + "i": 2 +} diff --git a/tests/sources/replays/04.json b/tests/sources/replays/04.json index 1a74992c..a7ca2e5f 100644 --- a/tests/sources/replays/04.json +++ b/tests/sources/replays/04.json @@ -1 +1,3 @@ -{"i": 3} +{ + "i": 3 +} diff --git a/tests/sources/replays/05.json b/tests/sources/replays/05.json index a66d1fc9..2bed66f3 100644 --- a/tests/sources/replays/05.json +++ b/tests/sources/replays/05.json @@ -1 +1,3 @@ -{"i": 4} +{ + "i": 4 +}