From 2cd72c886f39369f7a991907e48230f1713b7088 Mon Sep 17 00:00:00 2001 From: Ambroise Vincent Date: Tue, 28 Nov 2023 10:17:21 +0100 Subject: [PATCH 1/2] feat(json-schema-check): Print filename Signed-off-by: Ambroise Vincent --- json-schema-check/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json-schema-check/action.yaml b/json-schema-check/action.yaml index 9a5c89c1..a18b57eb 100644 --- a/json-schema-check/action.yaml +++ b/json-schema-check/action.yaml @@ -11,5 +11,5 @@ runs: - name: Check configuration files run: | - find -wholename '*/schema/*.schema.json' -execdir bash -c 'check-jsonschema --schemafile "$1" ../config/*.param.yaml' bash '{}' + + find -wholename '*/schema/*.schema.json' -printf '%p: ' -execdir bash -c 'check-jsonschema --schemafile "$1" ../config/*.param.yaml' bash '{}' + shell: bash From 8cf3e0963a3d912ed432caf940a28a669e0146b1 Mon Sep 17 00:00:00 2001 From: Ambroise Vincent Date: Tue, 28 Nov 2023 15:40:32 +0100 Subject: [PATCH 2/2] feat(json-schema-check): Allow for several schema files per package The goal is to allow one schema file per node in a package. And to allow several configuration files per schema. The schema files have to follow a NODE_NAME.schema.json naming convention and the configuration files have to follow a NODE_NAME*.param.yaml naming convention. Signed-off-by: Ambroise Vincent --- json-schema-check/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json-schema-check/action.yaml b/json-schema-check/action.yaml index a18b57eb..5b1822c1 100644 --- a/json-schema-check/action.yaml +++ b/json-schema-check/action.yaml @@ -11,5 +11,5 @@ runs: - name: Check configuration files run: | - find -wholename '*/schema/*.schema.json' -printf '%p: ' -execdir bash -c 'check-jsonschema --schemafile "$1" ../config/*.param.yaml' bash '{}' + + find -wholename '*/schema/*.schema.json' -printf '%p: ' -execdir bash -c 'check-jsonschema --schemafile "$1" ../config/"${1:2:-12}"*.param.yaml' bash '{}' + shell: bash