Skip to content

Commit

Permalink
docs(api): fix published api specs (#1399) (#1510)
Browse files Browse the repository at this point in the history
Co-authored-by: ndr_brt <andrea.bertagnolli@gmail.com>
  • Loading branch information
rafaelmag110 and ndr-brt committed Aug 27, 2024
1 parent 572a365 commit a325d8b
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions .github/workflows/publish-swaggerhub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,13 @@ on:
downstream-version:
required: false
type: string
upstream-version:
required: false
type: string

workflow_dispatch:
inputs:
downstream-version:
required: false
description: "Version of the Tractus-X EDC API to be should be published"
type: string
upstream-version:
required: false
description: "Version of upstream EDC which is to be used"
type: string

jobs:
swagger-api:
Expand All @@ -61,21 +54,15 @@ jobs:
run: |
npm i -g swaggerhub-cli
- name: Extract versions
- name: Extract version
run: |
if [ -z ${{ inputs.downstream-version }} ]; then
export DOWNSTREAM_VERSION=$(grep "version" gradle.properties | awk -F= '{print $2}')
else
export DOWNSTREAM_VERSION=${{ inputs.downstream-version }}
fi
if [ -z ${{ inputs.upstream-version }} ]; then
export UPSTREAM_VERSION=$(grep "edc = " gradle/libs.versions.toml | awk -F= '{print $2}' | jq -r)
else
export UPSTREAM_VERSION=${{ inputs.upstream-version }}
fi
echo "DOWNSTREAM_VERSION=$DOWNSTREAM_VERSION" >> "$GITHUB_ENV"
echo "UPSTREAM_VERSION=$UPSTREAM_VERSION" >> "$GITHUB_ENV"
- name: Resolve TX EDC API Spec
shell: bash
Expand All @@ -84,8 +71,8 @@ jobs:
- name: Download upstream API specs
run: |
curl -X GET https://eclipse-edc.github.io/Connector/openapi/management-api/${{ env.UPSTREAM_VERSION }}/management-api.yaml > resources/openapi/yaml/upstream-management-api.yaml
curl -X GET https://eclipse-edc.github.io/Connector/openapi/control-api/${{ env.UPSTREAM_VERSION }}/control-api.yaml > resources/openapi/yaml/upstream-control-api.yaml
curl -X GET https://eclipse-edc.github.io/Connector/openapi/management-api/management-api.yaml > resources/openapi/yaml/upstream-management-api.yaml
curl -X GET https://eclipse-edc.github.io/Connector/openapi/control-api/control-api.yaml > resources/openapi/yaml/upstream-control-api.yaml
- name: Merge API specs
run: |
Expand Down

0 comments on commit a325d8b

Please sign in to comment.