Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore: update Python SDK from latest OpenAPI specification #7

chore: update Python SDK from latest OpenAPI specification

chore: update Python SDK from latest OpenAPI specification #7

Workflow file for this run

# This workflow generates the Python SDK from the Permify OpenAPI specification
# It fetches the latest openapi.json from the Permify repository and runs the SDK generation script
name: Generate Python SDK
on:
workflow_dispatch:
push:
paths:
- 'generator/**'
- '.github/workflows/generator.yml'
jobs:
generate:
name: Generate SDK from OpenAPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Download OpenAPI spec from Permify repository
run: |
echo "Downloading latest OpenAPI specification from Permify repository..."
curl -L -o generator/openapi.json https://raw.githubusercontent.com/Permify/permify/master/docs/api-reference/openapiv2/apidocs.swagger.json
- name: Check if OpenAPI spec has changed
id: check_changes
run: |
if git diff --quiet generator/openapi.json; then
echo "No changes in OpenAPI specification"
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "OpenAPI specification has changed"
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Make generate script executable
if: steps.check_changes.outputs.changed == 'true'
run: chmod +x generator/generate-sdk.sh
- name: Setup Java
if: steps.check_changes.outputs.changed == 'true'
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- name: Generate Python SDK
if: steps.check_changes.outputs.changed == 'true'
run: |
cd generator
./generate-sdk.sh
- name: Configure Git
if: steps.check_changes.outputs.changed == 'true'
run: |
git config --global user.name "Permify GitHub Actions"
git config --global user.email "<>"
- name: Create Pull Request
if: steps.check_changes.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.PAT_TOKEN }}
commit-message: "chore: update Python SDK from latest OpenAPI specification"
title: "chore: update Python SDK from latest OpenAPI specification"
body: |
This PR updates the Python SDK based on the latest OpenAPI specification from the Permify repository.
## Changes
- Updated OpenAPI specification
- Regenerated Python SDK code
- Updated documentation
- Updated package configuration (setup.py, pyproject.toml)
This is an automated update generated by the SDK generator workflow.
branch: update-sdk-from-openapi
delete-branch: true