Skip to content

fix(docs): preserve x-fern-basic labels for runnable endpoints#16185

Open
shubhamsinnh wants to merge 1 commit into
fern-api:mainfrom
shubhamsinnh:codex/runnable-endpoint-x-fern-basic
Open

fix(docs): preserve x-fern-basic labels for runnable endpoints#16185
shubhamsinnh wants to merge 1 commit into
fern-api:mainfrom
shubhamsinnh:codex/runnable-endpoint-x-fern-basic

Conversation

@shubhamsinnh
Copy link
Copy Markdown

Summary

Adds regression coverage for x-fern-basic auth labels on runnable endpoint API definitions.

The existing OpenAPI fixture uses custom basic auth field names:

  • project_id for the username field
  • api_token for the password field

This change verifies that those labels are preserved through both:

  • OpenAPI/IR to FDR conversion in @fern-api/register
  • IR to Docs API definition conversion in @fern-api/docs-resolver

It also checks that the endpoint multiAuth entry points back to the same basic auth scheme, so callers rendering runnable endpoints can resolve the custom labels from authSchemes.

Notes

The runnable endpoint component itself does not appear to live in this package. If the UI still renders username / password, the remaining fix is likely in the renderer resolving endpoint auth scheme ids into apiDefinition.authSchemes.

Testing

  • tsc --noEmit -p packages/cli/register/tsconfig.json
  • tsc --noEmit -p packages/cli/docs-resolver/tsconfig.json
  • git diff --check HEAD
  • vitest --run src/ir-to-fdr-converter/__test__/openapi-from-flag.test.ts --testNamePattern "x-fern-basic" --config vitest.config.ts --reporter verbose
  • vitest --run src/__test__/x-fern-basic-auth.test.ts --config vitest.config.ts --reporter verbose

The Vitest runs used a local Node 20 preload for navigator; the repo's DevBox setup pins Node 22.

Copy link
Copy Markdown
Author

shubhamsinnh commented Jun 2, 2026

@amckinney could you sanity check if this is the right layer for #15956?

@shubhamsinnh shubhamsinnh marked this pull request as ready for review June 2, 2026 08:38
@shubhamsinnh shubhamsinnh requested a review from amckinney as a code owner June 2, 2026 08:38
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant