Skip to content

Fix Postman setup instructions with correct variable names #330

Merged
Devon-White merged 4 commits into
mainfrom
fern/update-postman-variable-docs
May 19, 2026
Merged

Fix Postman setup instructions with correct variable names #330
Devon-White merged 4 commits into
mainfrom
fern/update-postman-variable-docs

Conversation

@fern-api
Copy link
Copy Markdown
Contributor

@fern-api fern-api Bot commented May 15, 2026

What

Updates the "Try it in Postman" setup instructions in both REST API and Compatibility API overview pages to reflect the actual variable names in the generated Postman collections.

Why

The docs previously instructed users to set space, project_id, and auth_token in the collection Variables tab, but the Postman collections (generated from OpenAPI specs via openapi-to-postmanv2) actually use:

  • space_name — a collection-level variable for the Space subdomain
  • basicAuthUsername — a request-level auth variable for the Project ID
  • basicAuthPassword — a request-level auth variable for the API Token

Users following the old instructions would set the wrong variable names and requests would fail silently.

Changes

fern/products/apis/pages/core/overview.mdx (REST API overview):

  • Renamed step from "Set your environment variables" to "Set your credentials"
  • Replaced single-line instruction with numbered steps pointing to the correct variable names and their locations (Variables tab vs. Authorization tab)

fern/products/compatibility-api/pages/rest-api/core/overview.mdx (Compatibility API overview):

  • Same structural change, preserving the existing AccountSid/ProjectID cross-reference

Requested by: Fern Support

@fern-api
Copy link
Copy Markdown
Contributor Author

fern-api Bot commented May 15, 2026

Requested by: Devon White
Slack thread: View conversation

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 15, 2026

fern-api Bot and others added 3 commits May 15, 2026 19:54
The original PR fixes the docs that describe the published Postman
collection. While verifying it against the actual generated output, a
chain of pipeline issues surfaced — this commit lands the fixes and
re-aligns the docs.

Pipeline extraction
- scripts/postman/build-collection.mjs with `build` and `publish`
  subcommands; package.json exposes `yarn postman:build` /
  `yarn postman:publish`
- Workflow collapses from ~80 lines of inline shell to ~30 lines of
  orchestration; same code runs locally and in CI
- openapi-to-postmanv2 pinned as a direct devDependency (no global
  install needed locally)

Curated examples
- openapi-to-postmanv2's bundled faker reads `example:` (singular) but
  ignores OpenAPI 3.1's `examples:` array form, which the spec uses
  3,042 times in REST and 864 in compat
- scripts/postman/inline-examples.js: temp-copy preprocessor that
  collapses single-element schema-level examples arrays. Multi-element
  arrays and existing singular `example:` are preserved
- Source YAML stays 3.1-compliant; only what Postman sees changes

Per-operation security
- Drop `alwaysInheritAuthentication: true` from convert-options.json:
  the converter discards per-operation auth helpers when it's set, so
  bearer endpoints were getting auth: null and inheriting Basic Auth,
  which the server rejects
- After fix: 230 Basic endpoints inherit collection auth, 3 Bearer
  endpoints have explicit overrides, 1 public C2C endpoint has noauth

Customer-friendly variable names
- Collection-level Basic Auth references {{project_id}} / {{api_token}}
- Per-request Bearer Auth references {{subscriber_token}}
- All three are pre-declared in .variable[] with descriptions, visible
  in the Variables tab where the docs send customers
- subscriber_token is added only to collections that have bearer
  endpoints (REST yes, compat no)

REST docs
- Tip callout below the credentials table covering the subscriber_token
  flow with a link to the Create Subscriber Token endpoint
- Compat docs unchanged

To republish the live Postman collections, trigger the publish-postman
workflow via workflow_dispatch with force_all=true.
@Devon-White Devon-White merged commit 1297141 into main May 19, 2026
2 checks passed
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