Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(api): fix published api specs #1399

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading