diff --git a/.github/workflows/apidoc.yaml b/.github/workflows/apidoc.yaml deleted file mode 100644 index ac2e4f0b..00000000 --- a/.github/workflows/apidoc.yaml +++ /dev/null @@ -1,94 +0,0 @@ -name: Verify and Publish OpenAPI Specs - -on: - push: - pull_request: - branches: [ main ] - paths-ignore: - - '**.md' - - 'docs/**' - - 'CODEOWNERS' - - 'LICENSE' - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - Verify-OpenAPI-Definitions: - runs-on: ubuntu-latest - strategy: - fail-fast: true - matrix: - apiGroup: [ 'management-api' ] - env: - rootDir: resources/openapi/yaml/${{ matrix.apiGroup }} - steps: - - uses: actions/checkout@v4 - - uses: eclipse-edc/.github/.github/actions/setup-build@main - - - name: Save previous OpenAPI definition - run: | - mkdir -p git-sorted/${{ matrix.apiGroup }} - files=($(ls $rootDir)) - for file in ${files[@]}; do - yq -P 'sort_keys(..)' $rootDir/$file > git-sorted/${{ matrix.apiGroup }}/$file - done - - - name: Generate OpenAPI definitions from code - run: | - export - ./gradlew resolve - - # Can be used (and yq tasks removed) when https://github.com/kpramesh2212/openapi-merger-plugin/pull/11/files is merged - #- name: Check OpenAPI definitions match code - # run: git diff --exit-code - - - name: Check OpenAPI definitions match code - run: | - mkdir -p git-regen/${{ matrix.apiGroup }} - files=($(ls resources/openapi/yaml/${{ matrix.apiGroup}})) - - for file in ${files[@]}; do - yq -P 'sort_keys(..)' $rootDir/$file > git-regen/${{ matrix.apiGroup }}/$file - done - - diff -r git-sorted git-regen - - Publish-To-SwaggerHub: - # do NOT run on forks. The Org ("edc") is unique all across SwaggerHub - if: github.repository == 'eclipse-edc/FederatedCatalog' && github.event_name != 'pull_request' - runs-on: ubuntu-latest - needs: [ Verify-OpenAPI-Definitions ] - strategy: - matrix: - apiGroup: [ 'management-api' ] - apiName: [ 'FederatedCatalog API' ] - env: - rootDir: resources/openapi/yaml/${{ matrix.apiGroup }} - SWAGGERHUB_API_KEY: ${{ secrets.SWAGGERHUB_TOKEN }} - SWAGGERHUB_USER: ${{ secrets.SWAGGERHUB_USER }} - steps: - - uses: actions/checkout@v4 - - uses: eclipse-edc/.github/.github/actions/setup-build@main - - uses: actions/setup-node@v3 - - # merge together all api groups - - name: Generate API Specs - run: | - ./gradlew -PapiTitle="${{ matrix.apiName }}" -PapiDescription="REST API documentation for the ${{ matrix.apiName }}" :mergeApiSpec --input=${{ env.rootDir }} --output=${{ matrix.apiGroup }}.yaml - - # install swaggerhub CLI - - name: Install SwaggerHub CLI - run: npm i -g swaggerhub-cli - - # create API, will fail if exists - - name: Create API - continue-on-error: true - run: | - swaggerhub api:create ${{ env.SWAGGERHUB_USER }}/${{ matrix.apiName}} -f ${{ matrix.apiGroup }}.yaml --visibility=public --published=unpublish - - # Post the API to SwaggerHub as "unpublished", because published APIs cannot be overwritten - - name: Publish API Specs to SwaggerHub - run: | - swaggerhub api:update ${{ env.SWAGGERHUB_USER }}/${{ matrix.apiName}} -f ${{ matrix.apiGroup }}.yaml --visibility=public --published=unpublish diff --git a/.github/workflows/release-fcc.yml b/.github/workflows/release-fcc.yml index 0ea879a3..83e65967 100644 --- a/.github/workflows/release-fcc.yml +++ b/.github/workflows/release-fcc.yml @@ -47,13 +47,6 @@ jobs: with: version: ${{ needs.Prepare-Release.outputs.edc-version }} - publish-openapi-ui: - needs: Prepare-Release - uses: eclipse-edc/.github/.github/workflows/publish-openapi-ui.yml@main - secrets: inherit - with: - version: ${{ needs.Prepare-Release.outputs.edc-version }} - Github-Release: # cannot use the workflow-level env yet as it does not yet exist, must take output from previous job if: ${{ !endsWith( needs.Prepare-Release.outputs.edc-version, '-SNAPSHOT') }}