Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e4d350d
feat(api-reference): add auto-generated API changelog pages
gaprl Aug 18, 2026
a8a526e
feat(api-reference): clickable endpoint pills, chip-width Change column
gaprl Aug 18, 2026
ce52680
fix(api-reference): make changelog property paths readable
aaronmichaelacosta Sep 3, 2026
bd056f0
feat(api-reference): make the changelog RSS feed usable
aaronmichaelacosta Sep 3, 2026
6b31d5a
docs(api-reference): drop the v2 alpha caveat from the changelog intro
aaronmichaelacosta Sep 3, 2026
3402fad
fix(api-reference): stop generator changes republishing old feed entries
aaronmichaelacosta Sep 3, 2026
a72d74d
fix(api-reference): keep endpoint re-tagging out of the changelog
aaronmichaelacosta Sep 4, 2026
0482a4b
fix(api-reference): make the changelog's "Breaking" filter actually f…
aaronmichaelacosta Sep 5, 2026
246fc4b
style(api-reference): fix spacing and overflow in the changelog table
aaronmichaelacosta Sep 8, 2026
80ed688
fix(api-reference): collapse repeated changelog rows into one
aaronmichaelacosta Sep 8, 2026
f738bc3
fix(api-reference): list the hovercard's endpoints one per line
aaronmichaelacosta Sep 8, 2026
9046272
fix(api-reference): make the changelog usable for tracking deprecations
aaronmichaelacosta Sep 10, 2026
41f082e
docs(api-reference): publish the API deprecation policy
aaronmichaelacosta Sep 3, 2026
590767c
docs(api-reference): drop the 3-month removal window
aaronmichaelacosta Sep 4, 2026
493b4a3
docs(api-reference): apply tech writing review to the deprecation policy
aaronmichaelacosta Sep 4, 2026
8b06c7f
docs(api-reference): give beta endpoints 60 days' notice
aaronmichaelacosta Sep 9, 2026
e252d9a
docs(api-reference): address review on the deprecation policy
aaronmichaelacosta Sep 10, 2026
37ee39b
docs(api-reference): describe the changelog as it now behaves
aaronmichaelacosta Sep 10, 2026
1f33cb4
docs(api-reference): add v2 service landing pages
aaronmichaelacosta Sep 4, 2026
db820f1
docs(api-reference): stop promising stable endpoints never break
aaronmichaelacosta Sep 4, 2026
852c9e2
feat(api-reference): redirect endpoints whose page URL moves
aaronmichaelacosta Sep 4, 2026
83f1174
feat(api-reference): give each service a landing page in the nav
aaronmichaelacosta Sep 4, 2026
ff7310c
fix(api-reference): nest the service groups so they stay collapsible
aaronmichaelacosta Sep 4, 2026
f039318
feat(api-reference): list each service's endpoints on its landing page
aaronmichaelacosta Sep 4, 2026
a945910
style(api-reference): trim the endpoint sidebar
aaronmichaelacosta Sep 8, 2026
041f108
fix(api-reference): scope the nav rebuild to v2
aaronmichaelacosta Sep 8, 2026
54b2336
feat(api-reference): merge Scans and Agentic Workflows into Jobs
aaronmichaelacosta Sep 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 79 additions & 5 deletions .github/workflows/update-openapi-specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
update-specs:
name: Fetch specs and open PR if changed
runs-on: ubuntu-latest
timeout-minutes: 10
timeout-minutes: 15
steps:
# Runs as the semgrep-docs-release App rather than GITHUB_TOKEN for two
# reasons: App-authored PRs trigger Docs CI (GITHUB_TOKEN-authored ones do
Expand All @@ -39,6 +39,9 @@ jobs:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
token: ${{ steps.generate-token.outputs.token }}
# Full history: the changelog generator diffs the specs across git
# revisions, which oasdiff reads with `git show` under the hood.
fetch-depth: 0

- name: Fetch latest specs from semgrep.dev
run: |
Expand Down Expand Up @@ -67,13 +70,76 @@ jobs:

# Upstream emits no `servers:` block, and Mintlify has no docs.json
# override for OpenAPI-generated pages, so without this the playground
# renders https://api.example.com and cannot send requests. Runs last:
# the two steps above parse `paths:` and `tags:`, and neither needs to
# see the block this adds. Safe to drop once semgrep-app emits `servers`
# natively -- this step no-ops rather than overwriting it.
# renders https://api.example.com and cannot send requests. Runs after
# the two steps above, which parse `paths:` and `tags:` and neither of
# which needs to see the block this adds. Safe to drop once semgrep-app
# emits `servers` natively -- this step no-ops rather than overwriting it.
- name: Add the API base URL Mintlify's playground needs
run: uv run scripts/add_openapi_servers.py docs/public_v1.openapi.yaml docs/public_v2.openapi.yaml

# Checksummed binary download rather than a third-party action, per the
# supply-chain pinning policy. Keep the version pinned: bumping oasdiff
# regenerates every changelog entry, which belongs in its own PR.
- name: Install oasdiff (pinned)
run: |
curl --fail --silent --show-error --location --retry 3 \
--output /tmp/oasdiff.tar.gz \
https://github.com/oasdiff/oasdiff/releases/download/v1.28.0/oasdiff_1.28.0_linux_amd64.tar.gz
echo "e0ef076f2cf953d922addc04be9c3851cf3ec18f7678d2b94d44cea23dca51b5 /tmp/oasdiff.tar.gz" | sha256sum --check
tar -xzf /tmp/oasdiff.tar.gz -C /tmp oasdiff
sudo install /tmp/oasdiff /usr/local/bin/oasdiff

# Must run after the mirror, sort, and servers steps so the working-tree
# specs being diffed are in their final committed form. Runs before
# validate so the generated MDX is validated too.
- name: Regenerate API changelogs
run: |
uv run scripts/generate_api_changelog.py docs/public_v1.openapi.yaml \
docs/api-reference/v1/Changelog.mdx \
--api-name "Semgrep API v1" --api-href /api-reference/v1/Introduction \
--link-base /api-reference/v1 \
--rss-url https://docs.semgrep.dev/api-reference/v1/Changelog/rss.xml
uv run scripts/generate_api_changelog.py docs/public_v2.openapi.yaml \
docs/api-reference/v2/Changelog.mdx \
--api-name "Semgrep API v2" --api-href /api-reference/v2/Introduction \
--link-base /api-reference/v2 \
--rss-url https://docs.semgrep.dev/api-reference/v2/Changelog/rss.xml

# The table each service landing page shows. Hand-maintaining it would go
# stale every time an endpoint is published or regrouped, and a hardcoded
# "no endpoints yet" placeholder is wrong the moment the first one lands.
- name: Regenerate the service endpoint tables
run: |
uv run scripts/generate_service_endpoints.py docs/public_v2.openapi.yaml \
docs/snippets/api/v2 --link-base /api-reference/v2 \
--changelog /api-reference/v2/Changelog \
--services-dir docs/api-reference/v2/services

# One nav group per service, each opening its landing page rather than
# whichever endpoint sorts first. Mintlify's autogenerated groups cannot
# carry a `root`, so the endpoint list has to be enumerated -- which is
# why it is generated rather than hand-maintained. Runs after the sort
# step, whose order it inherits.
# v2 only. v1 has no service landing pages, and regrouping it would
# move every v1 endpoint's URL for no benefit -- it is legacy and its
# flat "Endpoints" group is fine.
- name: Rebuild the API navigation
run: |
uv run scripts/generate_api_nav.py docs/public_v2.openapi.yaml \
docs/docs.json --dropdown v2 --landing-dir api-reference/v2/services \
--directory api-reference/v2

# Mintlify builds an endpoint's page URL from its first tag, so an
# endpoint regrouped into a new service moves and its old URL 404s.
# Must run before the changelog step commits, and while the previous
# spec is still what HEAD has -- this diffs the two.
- name: Redirect endpoints whose page URL moved
run: |
uv run scripts/generate_openapi_redirects.py docs/public_v1.openapi.yaml \
docs/docs.json --link-base /api-reference/v1
uv run scripts/generate_openapi_redirects.py docs/public_v2.openapi.yaml \
docs/docs.json --link-base /api-reference/v2

- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 22
Expand All @@ -92,6 +158,10 @@ jobs:
add-paths: |
docs/public_v1.openapi.yaml
docs/public_v2.openapi.yaml
docs/docs.json
docs/api-reference/v1/Changelog.mdx
docs/api-reference/v2/Changelog.mdx
docs/snippets/api
branch: chore/update-openapi-specs
delete-branch: true
# Re-issued on every run, not just when the PR is first opened. That
Expand All @@ -113,3 +183,7 @@ jobs:

- `docs/public_v1.openapi.yaml` ← https://semgrep.dev/api/v1/public_v1.openapi.yaml
- `docs/public_v2.openapi.yaml` ← https://semgrep.dev/api/v2/openapi.yaml

The API changelog pages under `docs/api-reference/*/Changelog.mdx`
are regenerated from the spec's git history by
`scripts/generate_api_changelog.py`.
Loading
Loading