[Phase 6] ci: add scripts/publish-openapi.js and publish-openapi workflow (#100) #105
Reference in New Issue
Block a user
Delete Branch "feature/issue-100-publish-openapi"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements issue leeworks-agents/api-company#100.
Changes
scripts/publish-openapi.js: Node.js script (built-in modules only) that uploads each API'sopenapi.yamlto RapidAPI Platform API via PUT multipart/form-data. Skips silently ifRAPIDAPI_KEYor API IDs are not set (no crash, exits 0). Exits non-zero on HTTP errors..gitea/workflows/publish-openapi.yaml: triggers on push tomainwhenapis/*/openapi.yamlchanges. Runs Redocly CLI lint, detects changed specs, then calls the publish script.Validation
node --check scripts/publish-openapi.jspassesCloses leeworks-agents/api-company#100