From 0e9eec019c54e07fd6657e3dd2c867c76c6e3fb7 Mon Sep 17 00:00:00 2001 From: General Kroll Date: Sun, 12 Oct 2025 18:27:33 +1100 Subject: [PATCH] any-sdk-json-schema-validation Summary: - `any-sdk` json schema validation. - json schema validation incorpoarated into AOT checks. --- .github/workflows/aot.yml | 2 +- scripts/cicd/shell/aot-analysis/01-aot-analysis-compact.sh | 6 ++++-- scripts/cicd/shell/aot-orchestration/01-aot-analyse-all.sh | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/aot.yml b/.github/workflows/aot.yml index a6c04f99..967c882f 100644 --- a/.github/workflows/aot.yml +++ b/.github/workflows/aot.yml @@ -108,7 +108,7 @@ jobs: echo "" for line in $(${{ github.workspace }}/stackql-any-sdk/build/anysdk interrogate services ${{ github.workspace }}/providers ${subdir}/v00.00.00000/provider.yaml); do serviceIdentifier="${line}" - ./scripts/cicd/shell/aot-analysis/01-aot-analysis-compact.sh ${{ github.workspace }}/stackql-any-sdk/build/anysdk "${providerID}" "${subdir}/v00.00.00000/provider.yaml" "${serviceIdentifier}" & + ./scripts/cicd/shell/aot-analysis/01-aot-analysis-compact.sh ${{ github.workspace }}/stackql-any-sdk/build/anysdk "${providerID}" "${subdir}/v00.00.00000/provider.yaml" "${serviceIdentifier}" "${{ github.workspace }}/stackql-any-sdk/cicd/schema-definitions" & echo "" done done diff --git a/scripts/cicd/shell/aot-analysis/01-aot-analysis-compact.sh b/scripts/cicd/shell/aot-analysis/01-aot-analysis-compact.sh index 08c15c83..ecdf9a74 100755 --- a/scripts/cicd/shell/aot-analysis/01-aot-analysis-compact.sh +++ b/scripts/cicd/shell/aot-analysis/01-aot-analysis-compact.sh @@ -12,14 +12,16 @@ providerRootFile="${3}" serviceIdentifier="${4}" +jsonSchemaDir="${5}" + logDir="${REPOSITORY_ROOT}/test/log" registryDir="${REPOSITORY_ROOT}/providers" if [ "${serviceIdentifier}" != "" ]; then - ${anySdkExe} aot "${registryDir}" "${providerRootFile}" "${serviceIdentifier}" -v > "${logDir}/aot_${providerID}_${serviceIdentifier}.log" 2>&1 + ${anySdkExe} aot --schema-dir "${jsonSchemaDir}" "${registryDir}" "${providerRootFile}" "${serviceIdentifier}" -v > "${logDir}/aot_${providerID}_${serviceIdentifier}.log" 2>&1 else - ${anySdkExe} aot "${registryDir}" "${providerRootFile}" -v > "${logDir}/aot_${providerID}.log" 2>&1 + ${anySdkExe} aot --schema-dir "${jsonSchemaDir}" "${registryDir}" "${providerRootFile}" -v > "${logDir}/aot_${providerID}.log" 2>&1 fi rc="$?" diff --git a/scripts/cicd/shell/aot-orchestration/01-aot-analyse-all.sh b/scripts/cicd/shell/aot-orchestration/01-aot-analyse-all.sh index 7fa08f54..6790fe7d 100755 --- a/scripts/cicd/shell/aot-orchestration/01-aot-analyse-all.sh +++ b/scripts/cicd/shell/aot-orchestration/01-aot-analyse-all.sh @@ -6,6 +6,8 @@ REPOSITORY_ROOT="$(realpath "${CUR_DIR}/../../../..")" anySdkCliPath="${1}" +jsonSchemaDir="${2}" + for sd in ${REPOSITORY_ROOT}/providers/src/*/ ; do echo "" subdir="$(realpath "${sd}")" @@ -14,7 +16,7 @@ for sd in ${REPOSITORY_ROOT}/providers/src/*/ ; do echo "" for line in $(${anySdkCliPath} interrogate services ${REPOSITORY_ROOT}/providers ${subdir}/v00.00.00000/provider.yaml); do serviceIdentifier="${line}" - ${REPOSITORY_ROOT}/scripts/cicd/shell/aot-analysis/01-aot-analysis-compact.sh ${anySdkCliPath} "${providerID}" "${subdir}/v00.00.00000/provider.yaml" "${serviceIdentifier}" & + ${REPOSITORY_ROOT}/scripts/cicd/shell/aot-analysis/01-aot-analysis-compact.sh ${anySdkCliPath} "${providerID}" "${subdir}/v00.00.00000/provider.yaml" "${serviceIdentifier}" "${jsonSchemaDir}" & echo "" done done