Skip to content

feat: accept Fern legacy availability and status messages - #3

Open
AsharibAli wants to merge 4 commits into
cloudflare:mainfrom
AsharibAli:main
Open

AsharibAli wants to merge 4 commits into
cloudflare:mainfrom
AsharibAli:main

Conversation

@AsharibAli

Copy link
Copy Markdown

Summary

  • @cloudflare/forge now parses Fern's endpoint availability, including legacy and { status, message }, and keeps the note on the command model.
  • fern-forge accepts that object form, stores availabilityMessage, and passes the note through alias projections so rendered operations keep it.
  • The docs site uses one label for every Fern status and gives superseded endpoints a distinct badge.

Why

Fern's x-fern-availability extension is the lifecycle contract for SDKs, CLIs, and API reference pages: https://buildwithfern.com/learn/api-definition/openapi/extensions/availability

The core engine rejected legacy and the object form. fern-forge accepted legacy as a string but rejected { status, message }, so a spec written the way Fern documents it failed validation before the docs could show the note. legacy stays supported, so it is not treated as deprecated. Pre-release statuses still map to the @beta JSDoc tag Fern's TypeScript generator emits, and deprecated maps to @deprecated.

Tests

  • @cloudflare/forge: 44 tests passed, including the availability parser, overlay round-trip, and direct OpenAPI ingestion. tsc --noEmit passed.
  • fern-forge: 18 tests passed, including primary and alias message preservation and rejection of unknown or blank messages. tsc --noEmit passed.
  • docs-site: availability label tests passed.

Parse Fern endpoint statuses, including legacy, and the { status, message } object. Keep the note on the command model and preserve it on overlaid operations.
Accept x-fern-availability objects, store the note beside the status, and pass it through alias projections so rendered operations keep it.
Share one label for every Fern status and give superseded endpoints a distinct badge.
feat: accept Fern legacy availability and status messages
Copilot AI lite review requested due to automatic review settings September 28, 2026 14:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

2 participants