Skip to content

Generate Swagger Client #170

Generate Swagger Client

Generate Swagger Client #170

Workflow file for this run

name: Generate Swagger Client
on:
push:
paths:
- .github/**
- patches/**
workflow_dispatch:
schedule:
- cron: '0 19 * * *'
permissions:
contents: write
jobs:
generate-client:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
check-latest: true
- name: Generate Client
run: |
rm -rf client models
go get github.com/go-swagger/go-swagger/cmd/swagger
go run github.com/go-swagger/go-swagger/cmd/swagger generate client --spec https://raw.githubusercontent.com/superseriousbusiness/gotosocial/main/docs/api/swagger.yaml
patch -u -p1 -i patches/filter-context.diff
- name: Go Mod Tidy
run: go mod tidy
- name: Check and Commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "update generated client"