-
Notifications
You must be signed in to change notification settings - Fork 21
59 lines (51 loc) · 1.79 KB
/
openapi-types.yml
File metadata and controls
59 lines (51 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: OpenAPI generated types
# Issue #37 phase 2: the checked-in generated artifacts must be reproducible
# from docs/openapi/qveris-public-api.openapi.json. Regenerate with the pinned
# generators and fail if the working tree differs (contract / generator drift).
on:
pull_request:
paths:
- "docs/openapi/**"
- "packages/mcp/src/generated/**"
- "packages/python-sdk/qveris/generated/**"
- "packages/mcp/package.json"
- "packages/python-sdk/pyproject.toml"
- "scripts/regenerate-openapi-artifacts.sh"
- ".github/workflows/openapi-types.yml"
push:
branches:
- main
paths:
- "docs/openapi/**"
- "packages/mcp/src/generated/**"
- "packages/python-sdk/qveris/generated/**"
- "packages/mcp/package.json"
- "packages/python-sdk/pyproject.toml"
- "scripts/regenerate-openapi-artifacts.sh"
- ".github/workflows/openapi-types.yml"
permissions:
contents: read
jobs:
regen-and-diff:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Regenerate OpenAPI artifacts
run: bash scripts/regenerate-openapi-artifacts.sh
- name: Fail on drift
run: |
if ! git diff --exit-code -- \
packages/mcp/src/generated/openapi.d.ts \
packages/python-sdk/qveris/generated/openapi_models.py; then
echo "::error::Generated OpenAPI artifacts are out of date. Run 'bash scripts/regenerate-openapi-artifacts.sh' or 'npm --prefix packages/mcp run gen:openapi', then commit."
exit 1
fi