From 8a3f86b9ddd0a24de216b014eb4eb623dafa68ae Mon Sep 17 00:00:00 2001 From: Aleksandar Stojanov Date: Mon, 11 Nov 2024 10:24:14 +0100 Subject: [PATCH] renam test and generate testdata schemas Signed-off-by: Aleksandar Stojanov --- pkg/generator_test.go | 2 +- testdata/anchors.schema.json | 5 +++++ testdata/basic.schema.json | 5 +++++ testdata/meta.schema.json | 5 +++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/pkg/generator_test.go b/pkg/generator_test.go index 11fff24..c1fce06 100644 --- a/pkg/generator_test.go +++ b/pkg/generator_test.go @@ -37,7 +37,7 @@ func TestGenerateJsonSchema(t *testing.T) { templateSchemaFile: "../testdata/full.schema.json", }, { - name: "full json schema", + name: "noAdditionalProperties", config: &Config{ Draft: 2020, Indent: 4, diff --git a/testdata/anchors.schema.json b/testdata/anchors.schema.json index 3282a74..b8a975c 100644 --- a/testdata/anchors.schema.json +++ b/testdata/anchors.schema.json @@ -1,5 +1,9 @@ { + "$id": "https://example.com/schema", + "$ref": "schema/product.json", "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": true, + "description": "Schema for Helm values", "properties": { "app": { "properties": { @@ -20,5 +24,6 @@ "type": "object" } }, + "title": "Helm Values Schema", "type": "object" } diff --git a/testdata/basic.schema.json b/testdata/basic.schema.json index d09075d..a743800 100644 --- a/testdata/basic.schema.json +++ b/testdata/basic.schema.json @@ -1,5 +1,9 @@ { + "$id": "https://example.com/schema", + "$ref": "schema/product.json", "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": true, + "description": "Schema for Helm values", "properties": { "empty": { "type": "null" @@ -57,5 +61,6 @@ "type": "array" } }, + "title": "Helm Values Schema", "type": "object" } diff --git a/testdata/meta.schema.json b/testdata/meta.schema.json index f392785..4183d7b 100644 --- a/testdata/meta.schema.json +++ b/testdata/meta.schema.json @@ -1,5 +1,9 @@ { + "$id": "https://example.com/schema", + "$ref": "schema/product.json", "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": true, + "description": "Schema for Helm values", "properties": { "fullnameOverride": { "title": "Full name override", @@ -50,5 +54,6 @@ "type": "array" } }, + "title": "Helm Values Schema", "type": "object" }