Skip to content

Commit 0e9eec0

Browse files
any-sdk-json-schema-validation
Summary: - `any-sdk` json schema validation. - json schema validation incorpoarated into AOT checks.
1 parent f1a54ed commit 0e9eec0

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.github/workflows/aot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108
echo ""
109109
for line in $(${{ github.workspace }}/stackql-any-sdk/build/anysdk interrogate services ${{ github.workspace }}/providers ${subdir}/v00.00.00000/provider.yaml); do
110110
serviceIdentifier="${line}"
111-
./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}" &
111+
./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" &
112112
echo ""
113113
done
114114
done

scripts/cicd/shell/aot-analysis/01-aot-analysis-compact.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@ providerRootFile="${3}"
1212

1313
serviceIdentifier="${4}"
1414

15+
jsonSchemaDir="${5}"
16+
1517
logDir="${REPOSITORY_ROOT}/test/log"
1618

1719
registryDir="${REPOSITORY_ROOT}/providers"
1820

1921
if [ "${serviceIdentifier}" != "" ]; then
20-
${anySdkExe} aot "${registryDir}" "${providerRootFile}" "${serviceIdentifier}" -v > "${logDir}/aot_${providerID}_${serviceIdentifier}.log" 2>&1
22+
${anySdkExe} aot --schema-dir "${jsonSchemaDir}" "${registryDir}" "${providerRootFile}" "${serviceIdentifier}" -v > "${logDir}/aot_${providerID}_${serviceIdentifier}.log" 2>&1
2123
else
22-
${anySdkExe} aot "${registryDir}" "${providerRootFile}" -v > "${logDir}/aot_${providerID}.log" 2>&1
24+
${anySdkExe} aot --schema-dir "${jsonSchemaDir}" "${registryDir}" "${providerRootFile}" -v > "${logDir}/aot_${providerID}.log" 2>&1
2325
fi
2426

2527
rc="$?"

scripts/cicd/shell/aot-orchestration/01-aot-analyse-all.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ REPOSITORY_ROOT="$(realpath "${CUR_DIR}/../../../..")"
66

77
anySdkCliPath="${1}"
88

9+
jsonSchemaDir="${2}"
10+
911
for sd in ${REPOSITORY_ROOT}/providers/src/*/ ; do
1012
echo ""
1113
subdir="$(realpath "${sd}")"
@@ -14,7 +16,7 @@ for sd in ${REPOSITORY_ROOT}/providers/src/*/ ; do
1416
echo ""
1517
for line in $(${anySdkCliPath} interrogate services ${REPOSITORY_ROOT}/providers ${subdir}/v00.00.00000/provider.yaml); do
1618
serviceIdentifier="${line}"
17-
${REPOSITORY_ROOT}/scripts/cicd/shell/aot-analysis/01-aot-analysis-compact.sh ${anySdkCliPath} "${providerID}" "${subdir}/v00.00.00000/provider.yaml" "${serviceIdentifier}" &
19+
${REPOSITORY_ROOT}/scripts/cicd/shell/aot-analysis/01-aot-analysis-compact.sh ${anySdkCliPath} "${providerID}" "${subdir}/v00.00.00000/provider.yaml" "${serviceIdentifier}" "${jsonSchemaDir}" &
1820
echo ""
1921
done
2022
done

0 commit comments

Comments
 (0)