diff --git a/.github/workflows/diff.yml b/.github/workflows/diff.yml index 61874ed..133aeb5 100644 --- a/.github/workflows/diff.yml +++ b/.github/workflows/diff.yml @@ -44,13 +44,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 + - name: Apply overlay to API document + run: | + npx bump-cli overlay apis/greenly-openapi-source.json overlays/greenly-remove-operation.yaml > tmp/greenly-openapi-public.json - name: Comment pull request with API diff - uses: bump-sh/github-action@v1 + uses: paulrbr/github-action@upgrade-dependencies with: doc: greenly token: ${{ secrets.GREENLY_BUMP_TOKEN }} - file: apis/greenly-openapi-source.json + file: tmp/greenly-openapi-public.json command: diff env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/overlays/greenly-remove-operation.yaml b/overlays/greenly-remove-operation.yaml new file mode 100644 index 0000000..f77994a --- /dev/null +++ b/overlays/greenly-remove-operation.yaml @@ -0,0 +1,8 @@ +overlay: 1.0.0 +info: + title: Remove all get operations + version: 0.0.1 +actions: + - target: '$.paths.*.get' + description: remove first operation + remove: true diff --git a/tmp/.gitkeep b/tmp/.gitkeep new file mode 100644 index 0000000..e69de29