adding validation check

This commit is contained in:
2026-02-23 01:23:19 +00:00
parent b1d3032602
commit 95e4945935

View File

@ -86,3 +86,23 @@ jobs:
while IFS= read -r url; do
echo "$url was changed"
done <<< "${{ steps.changed-urls.outputs.changed_urls }}"
- name: Validate OpenAPI files
env:
OPENAPI_TOKEN: ${{ secrets.OPENAPI_TOKEN }}
run: |
while IFS= read -r url; do
[ -z "$url" ] && continue
echo "Validating $url"
curl -sS -X POST "https://openapi-validator.eco-preprod.tsi-dev.otc-service.com/api/validate" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAPI_TOKEN" \
-d "$(jq -n \
--arg path "$url" \
'{path: $path, export: "xml", ruleset: "default"}')"
echo
done <<< "${{ steps.changed-urls.outputs.changed_urls }}"