Commit cb280ef
Threat Intelligence Beta: OpenAPI spec, interactive reference, Postman (#22)
* Slim Beta tier page to narrative; endpoint detail lives in OpenAPI reference
Removes the per-endpoint tables, request bodies, field reference, and response
shapes from beta.md now that they're generated from the OpenAPI spec. Keeps
the narrative that belongs on a prose page: auth, platforms, pagination
strategy, error codes, testing recipes, and v2 migration notes.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Flesh out OpenAPI info, tag, and operation descriptions
Tag landing pages (e.g. /operations/tags/vulnerabilities/) and the overview
were rendering only the one-line blurb for each tag. Expand the info,
tags[].description, and the thinner operation descriptions so each
generated page has usable content: auth, platforms, pagination strategies,
errors, related pages, and per-tag endpoint guides with deep links.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Wire starlight-openapi plugin and register API reference sidebar group
Pins starlight-openapi ^0.22.1 (latest version compatible with
Starlight 0.34 / Astro 5.9; 0.23+ requires Starlight ≥0.38). Renders the
Threat Intelligence Beta YAML under /api-reference/threat-intelligence-beta/
and adds an "API reference" sidebar group populated by openAPISidebarGroups.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Publish Threat Intelligence Beta spec + Postman collection
- Move schemas/threat-intel-beta.yaml into public/ so it's served at
https://docs.patchstack.com/schemas/threat-intel-beta.yaml.
- Add a small Astro integration that runs openapi-to-postmanv2 at
config:setup, writing public/schemas/threat-intel-beta.postman_collection.json
on every build. The generated collection is gitignored — the OpenAPI
YAML stays the single source of truth.
- Expand beta.md with a "Use with Postman / Insomnia / Bruno / Hoppscotch"
section including a Run in Postman button, a Claude Code / LLM
assistants section, and openapi-generator snippets for SDK generation.
Only the Threat Intelligence Beta API is wired up for now. Additional
APIs can drop a YAML into public/schemas/ and add an entry to the
postmanCollections array and starlightOpenAPI config.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Consolidate API sidebar and pin Beta to top
- Merge the standalone "API reference" top-level sidebar group into
"API solutions" → "Threat Intelligence API", immediately below the
Beta narrative. Users now have a single entry point to find
anything API-related; the narrative and interactive reference sit
side-by-side under the same parent.
- Convert "API solutions" from autogenerate to a manual items list
so the generated OpenAPI pages (openAPISidebarGroups) can be
interleaved with the .md files.
- Pin Beta to the top of the Threat Intelligence group via
sidebar.order: 0 and add a "New" tip badge so it's discoverable.
- Rename the OpenAPI reference label from "Threat Intelligence API
(Beta)" to "Interactive reference (Beta)" to avoid redundancy with
the parent group name.
Trade-off: new pages dropped into API solutions subfolders no longer
auto-appear in the sidebar — astro.config.mjs needs a manual entry.
Acceptable for the current 6 pages across 2 APIs.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Restore API solutions Introduction page in sidebar
The manual items list dropped the index.mdx entry that autogenerate was
picking up. Add { slug: 'api-solutions' } at the top so the Introduction
page appears before App API and Threat Intelligence API, preserving the
original order.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Group Beta narrative + reference under one sidebar item
Move the Beta entries to the bottom of the Threat Intelligence API
group and nest them under a single expandable "Beta tier API" group
(with the "New" badge on the group itself). The narrative is now
labelled "Guide" and the OpenAPI-generated pages are labelled
"Reference" — both together inside the Beta parent, so everything
Beta is one click and one glance.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Make Postman collection deterministic and commit it
Strip `id` and `_postman_id` UUIDs from the generated collection (both
optional in Collection v2.1 — Postman assigns new ones on import) and
add example values to schemas where openapi-to-postmanv2 was otherwise
synthesising random data (OffsetPagination, CursorPagination,
ProductType/Name/Version path params). Two consecutive builds now
produce byte-identical output.
Commit the collection so it's reachable via GitHub raw URL the moment
this PR merges, instead of waiting on a docs.patchstack.com deploy.
Build-time regeneration stays in place so the JSON can never drift
from the YAML.
Update the Run in Postman button to use the GitHub raw URL on main and
add a direct-download fallback link for testing locally and on deploy
previews — Postman's cloud cannot fetch a localhost: URL, which was
producing the "blank Run in Postman modal" symptom.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Remove broken Run in Postman button from Beta guide
The "Run in Postman" button relied on the deprecated
`app.getpostman.com/run-collection/?collection=<url>` endpoint, which no
longer accepts raw collection URLs — it only works with collections
published to Postman's Public API Network and referenced by UID. The
button silently did nothing when clicked.
Replacing it with a plain download link plus a `File → Import → Link`
instruction is honest about the flow and actually works today. Can be
re-added later if/when the collection is published to Postman.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Revert "Remove broken Run in Postman button from Beta guide"
This reverts commit fe4d16c.
* Remove broken Run in Postman button from Beta guide
Per Mario's review on PR #22: the app.getpostman.com/run-collection/?collection=<url>
endpoint was deprecated. Postman now only accepts published collections
referenced by UID through the Public API Network — raw JSON URLs fail
silently, which is what produced the blank-modal symptom.
Replace the button with the honest flow: download + File → Import → Link.
Can be re-added later without a breaking change if someone publishes the
collection to Postman.
Co-Authored-By: Mario Tarosso <mariojgt2@gmail.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Rename Beta tier → Beta API and add partner-only guidance to Overview
Rename the sidebar group and page title from "Beta tier API" to
"Beta API" — Beta isn't an access tier alongside Standard / Extended,
it's a new generation of the API. The "tier" naming invited the wrong
mental model.
Add a "Which API should I use?" comparison table to Overview and
clearly flag Beta as available to selected partners working directly
with Patchstack only. Update the Beta guide intro and Overview's Beta
blurb to match.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Un-bold the Beta API sidebar group label
Starlight applies .large (heavier weight + larger size) to sidebar
group labels. In a sub-group where Beta API sits next to leaf items
(Standard tier API, Extended tier API, API properties) the bold
treatment made Beta look visually promoted, even though its "New"
badge already carries the emphasis.
Scope the override via :has() so it only fires on group labels that
carry a badge — today that's Beta API, and any future badged group
will get the same treatment automatically without affecting plain
groups like App API or Threat Intelligence API.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Mario Tarosso <mariojgt2@gmail.com>1 parent 2053632 commit cb280ef
8 files changed
Lines changed: 3748 additions & 303 deletions
File tree
- public/schemas
- src
- content/docs/API solutions/Threat Intelligence API
- styles
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| 6 | + | |
| 7 | + | |
4 | 8 | | |
5 | 9 | | |
6 | 10 | | |
7 | 11 | | |
8 | 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 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
9 | 67 | | |
10 | 68 | | |
11 | 69 | | |
| |||
18 | 76 | | |
19 | 77 | | |
20 | 78 | | |
| 79 | + | |
21 | 80 | | |
22 | 81 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
32 | 90 | | |
33 | 91 | | |
34 | 92 | | |
| |||
73 | 131 | | |
74 | 132 | | |
75 | 133 | | |
76 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
77 | 161 | | |
78 | 162 | | |
79 | 163 | | |
| |||
0 commit comments