Skip to content

ci: scheduled refresh of OpenAPI specs from semgrep.dev#2706

Draft
gaprl wants to merge 2 commits into
mainfrom
gabriellopes/openapi-specs-refresh-workflow
Draft

ci: scheduled refresh of OpenAPI specs from semgrep.dev#2706
gaprl wants to merge 2 commits into
mainfrom
gabriellopes/openapi-specs-refresh-workflow

Conversation

@gaprl

@gaprl gaprl commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Stack context

Stacked on #2703 (auto-generated API reference for v1 + v2). That PR makes Mintlify render the API docs from the checked-in specs; this one keeps those specs fresh. Merge #2703 first.

What

New workflow update-openapi-specs.yml (weekday-morning cron + manual workflow_dispatch):

  1. Fetches both specs from what semgrep-app serves in production:
  2. Mirrors x-displayName tag names into x-group (Mintlify's extension for nav group labels; skipped once upstream emits x-group natively).
  3. Runs mintlify validate against the fetched specs — a bad or partial upstream spec blocks the update instead of breaking the live docs.
  4. Opens a PR only when the specs changed (peter-evans/create-pull-request, chore/update-openapi-specs branch, auto-deleted after merge).

Actions are pinned to full commit SHAs with version comments.

Caveats

  • PRs opened with the default GITHUB_TOKEN don't trigger Docs CI on the created PR. Reviewers can close/reopen to run CI, or provide a DOCS_BOT_TOKEN secret (the workflow prefers it automatically when present).
  • The live specs currently contain validation bugs (type: bool, duplicate tags, prose in a type: field) that were patched in the checked-in copies in API reference: auto-generate from OpenAPI specs, add v1 and v2 #2703. Until they're fixed at the source in semgrep-app, the first scheduled run will fail at the validate step by design — that's the guard doing its job, not a workflow bug.

@gaprl
gaprl marked this pull request as draft July 13, 2026 19:47
Base automatically changed from gabriellopes/appex-1187-make-v2-openapi-docs-available-in-mintlify-docs to main July 14, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant