feat(docs): add show-permission-denied-page docs.yml setting - #17199
feat(docs): add show-permission-denied-page docs.yml setting#17199devin-ai-integration[bot] wants to merge 2 commits into
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
There was a problem hiding this comment.
AI Review Summary
Straightforward opt-in docs setting that mirrors the existing hide-404-page plumbing across schema, SDK types, serialization, and parsing. Consistent and complete on the CLI side. One gap: the PR description claims the value flows into convertDocsSettings() → FDR write settings, but the diff only shows convertSettingsConfig populating the parsed config — verify the downstream write actually forwards showPermissionDeniedPage, otherwise this is a no-op.
- 🟡 1 warning(s)
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Docs Generation Benchmark ResultsComparing PR branch against median of 5 nightly run(s) on
Docs generation runs |
SDK Generation Benchmark ResultsComparing PR branch against median of 5 nightly run(s) on Full benchmark table (click to expand)
main (generator): generator-only time via --skip-scripts (includes Docker image build, container startup, IR parsing, and code generation — this is the same Docker-based flow customers use via |
Description
Adds a new opt-in docs setting
settings.show-permission-denied-pagetodocs.yml. This is the CLI-side plumbing for the platform feature in fern-api/fern-platform#13318.When enabled, an authenticated user who navigates to a page they lack permission to view sees a "You don't have permission to view this page" screen (with a login button) instead of the default 404. Default is
false— the existing indistinguishable-404 behavior is preserved. Mirrors the existinghide-404-pagesetting end-to-end.Changes Made
fern/apis/docs-yml/definition/docs.yml— addshow-permission-denied-page: optional<boolean>toDocsSettingsConfig(source of truth for generated schemas/SDK).packages/cli/configuration/src/docs-yml/DocsYmlSchemas.ts— add the zod field.schemas/sdk/api/...andschemas/sdk/serialization/...) — addshowPermissionDeniedPage↔"show-permission-denied-page".ParsedDocsConfiguration.ts— re-declareshowPermissionDeniedPageonParsedDocsSettingsConfig(same pattern asdisableEnvironmentEditing, since the published fdr-sdk type is stale).parseDocsConfiguration.ts— default tofalse; the value flows throughconvertDocsSettings()→ FDR write settings at runtime.docs-yml.schema.json(root +packages/cli/workspace/loader/src),fern-yml.schema.json.packages/cli/cli/changes/unreleased/add-show-permission-denied-page-setting.yml(feat).Testing
pnpm turbo run compilefor@fern-api/configuration,@fern-api/configuration-loader,@fern-api/docs-resolver— all pass (39 tasks).pnpm --filter=@fern-api/configuration --filter=@fern-api/configuration-loader test— pass (incl. the schema-loadingcollapsibleNavigationConfigtest that readsdocs-yml.schema.json).Link to Devin session: https://app.devin.ai/sessions/3e8361e78fe04403aea1c218fbdd814a