Skip to content

Commit

Permalink
feat: add x-xgen-sha to the generated foascli
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaangiolillo committed Aug 20, 2024
1 parent 96c1880 commit c1db6ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/scripts/download_specs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ jq -c '.services[]' foas-metadata.json | while read -r service; do

echo "Downloading the OpenAPI Spec for ${name} with sha ${sha}"
aws s3 cp "s3://${S3_BUCKET}/openapi/oas/${name}/${sha}.json" "openapi-${name}.json"

if [[ "${name}" == "mms" ]]; then
echo "FOAS_SHA=${sha}" >> "${GITHUB_ENV:?}"
fi
done

4 changes: 2 additions & 2 deletions .github/scripts/generate_federated_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ service_array+=("-e" "openapi-${service}.json")
done < <(jq -r '.services[] | select(.name != "mms") | .name' foas-metadata.json)

echo "Running FOAS CLI merge command with the following services: " "${service_array[@]}"
foascli merge -b openapi-mms.json "${service_array[@]}" -o openapi-foas.json -x -f json
foascli merge -b openapi-mms.json "${service_array[@]}" -o openapi-foas.yaml -x -f yaml
foascli merge -b openapi-mms.json "${service_array[@]}" -o openapi-foas.json -x -f json --sha "${FOAS_SHA}"
foascli merge -b openapi-mms.json "${service_array[@]}" -o openapi-foas.yaml -x -f yaml --sha "${FOAS_SHA}"

0 comments on commit c1db6ff

Please sign in to comment.