fix(docs): preserve x-fern-basic labels for runnable endpoints#16185
Open
shubhamsinnh wants to merge 1 commit into
Open
fix(docs): preserve x-fern-basic labels for runnable endpoints#16185shubhamsinnh wants to merge 1 commit into
shubhamsinnh wants to merge 1 commit into
Conversation
Author
|
@amckinney could you sanity check if this is the right layer for #15956? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds regression coverage for
x-fern-basicauth labels on runnable endpoint API definitions.The existing OpenAPI fixture uses custom basic auth field names:
project_idfor the username fieldapi_tokenfor the password fieldThis change verifies that those labels are preserved through both:
@fern-api/register@fern-api/docs-resolverIt also checks that the endpoint
multiAuthentry points back to the same basic auth scheme, so callers rendering runnable endpoints can resolve the custom labels fromauthSchemes.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 intoapiDefinition.authSchemes.Testing
tsc --noEmit -p packages/cli/register/tsconfig.jsontsc --noEmit -p packages/cli/docs-resolver/tsconfig.jsongit diff --check HEADvitest --run src/ir-to-fdr-converter/__test__/openapi-from-flag.test.ts --testNamePattern "x-fern-basic" --config vitest.config.ts --reporter verbosevitest --run src/__test__/x-fern-basic-auth.test.ts --config vitest.config.ts --reporter verboseThe Vitest runs used a local Node 20 preload for
navigator; the repo's DevBox setup pins Node 22.