Skip to content

Delete api_client directory #17

Delete api_client directory

Delete api_client directory #17

Workflow file for this run

name: Generate API Client
on:
push:
branches:
- main
jobs:
generate-api-client:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Install Dependencies
run: npm install
- name: Generate API Client
env:
OPEN_API_FILE_PATH: "./swagger.json"
OPEN_API_GENERATE_CONFIG: "./advancer_api_client.config.json"
OPEN_API_GENERATE_DIRECTORY: "./api_client"
run: |
npx openapi-generator-cli generate -i "$OPEN_API_FILE_PATH" -g typescript-axios -c "$OPEN_API_GENERATE_CONFIG" -o "$OPEN_API_GENERATE_DIRECTORY" -t "./typescript_generator_templates"
cd "$OPEN_API_GENERATE_DIRECTORY"
npm i axios@latest
npm i -D @types/node@latest typescript@latest
npm run build
cp package.json ./dist/package.json
- name: Commit Generated Code
run: |
git config user.name "numanbtt"
git config user.email "numanbtt@gmail.com"
git add ./api_client
git commit -m "Update generated API client"
git push