Skip to content

docs(write): add /v2/write/correct corrections-only endpoint #16

docs(write): add /v2/write/correct corrections-only endpoint

docs(write): add /v2/write/correct corrections-only endpoint #16

name: Update OpenAPI JSON files from YAML sources
on:
pull_request:
branches: ["main"]
paths:
- "api-reference/openapi.yaml"
- "api-reference/voice/voice.asyncapi.yaml"
jobs:
convert_yaml_to_json:
name: Convert YAML specs to JSON
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
ref: ${{ github.head_ref }}
- name: Convert YAML specs to JSON
run: |
python3 -c "
import yaml, json, sys
for src, dst in [
('api-reference/openapi.yaml', 'api-reference/openapi.json'),
('api-reference/voice/voice.asyncapi.yaml', 'api-reference/voice/voice.asyncapi.json'),
]:
with open(src) as f:
data = yaml.safe_load(f)
with open(dst, 'w') as f:
json.dump(data, f, indent=2, ensure_ascii=False)
f.write('\n')
"
- name: Commit updated JSON files
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: update OpenAPI JSON files from YAML sources"
file_pattern: "api-reference/openapi.json api-reference/voice/voice.asyncapi.json"