Internals
Scripts
Read this page when maintaining API schema tracking and generated index artifacts.
Script Inventory
| Script | Purpose | Inputs | Outputs |
|---|---|---|---|
scripts/sync_openapi.py | Fetch latest OpenAPI schema | --url, --out, --metadata, env token/url | openapi/openapi.json, openapi/metadata.json |
scripts/generate_openapi_index.py | Build compact operation list for diff/review | --schema, --out | src/rsspot/generated/openapi_index.py |
Operational Guardrails
- Run
sync_openapi.pybefore regenerating index. - Commit schema, metadata, and generated index together to keep review coherent.
- Treat failed fetches as blocking events for API-surface updates.
- Keep generated file header intact (
Generated by scripts/generate_openapi_index.py).
Suggested Maintenance Routine
uv run python scripts/sync_openapi.py
uv run python scripts/generate_openapi_index.py
git diff -- openapi src/rsspot/generated/openapi_index.py
If the diff is large, split review into:
- schema/operation changes
- corresponding SDK model/service changes