Skip to content

Commit

Permalink
REST API client github action
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobw committed Oct 22, 2024
1 parent b0dcf28 commit 6cccdf8
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/publishRestApiClient.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish REST API Client
on:
push:
branches: [ master ]
jobs:
build-and-publish-api-client:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '20.x'
- name: Dereference OpenAPI doc
run: npx json-dereference-cli json-dereference -s repo/rest-api/src/RouteHandlers/openapi.json -o openapi-dereferenced.json
- name: Build the API client
uses: addnab/docker-run-action@v3
with:
image: openapitools/openapi-generator-cli
options: -v ${{ github.workspace }}:/local -w /local
run: |
/usr/local/bin/docker-entrypoint.sh generate \
-i openapi-dereferenced.json \
-g javascript \
-o api-client \
--additional-properties=usePromises=true
- name: test
run: echo "$(ls -l api-client/)"

0 comments on commit 6cccdf8

Please # to comment.