Skip to content

feat(docs): add show-permission-denied-page docs.yml setting - #17199

Open
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1784753852-docs-show-permission-denied-page
Open

feat(docs): add show-permission-denied-page docs.yml setting#17199
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1784753852-docs-show-permission-denied-page

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a new opt-in docs setting settings.show-permission-denied-page to docs.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 existing hide-404-page setting end-to-end.

# docs.yml
settings:
  show-permission-denied-page: true

Changes Made

  • fern/apis/docs-yml/definition/docs.yml — add show-permission-denied-page: optional<boolean> to DocsSettingsConfig (source of truth for generated schemas/SDK).
  • packages/cli/configuration/src/docs-yml/DocsYmlSchemas.ts — add the zod field.
  • Generated docs-yml SDK types/serializers (schemas/sdk/api/... and schemas/sdk/serialization/...) — add showPermissionDeniedPage"show-permission-denied-page".
  • ParsedDocsConfiguration.ts — re-declare showPermissionDeniedPage on ParsedDocsSettingsConfig (same pattern as disableEnvironmentEditing, since the published fdr-sdk type is stale).
  • parseDocsConfiguration.ts — default to false; the value flows through convertDocsSettings() → FDR write settings at runtime.
  • Regenerated JSON schemas: docs-yml.schema.json (root + packages/cli/workspace/loader/src), fern-yml.schema.json.
  • Changelog: packages/cli/cli/changes/unreleased/add-show-permission-denied-page-setting.yml (feat).

Testing

  • pnpm turbo run compile for @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-loading collapsibleNavigationConfig test that reads docs-yml.schema.json).
  • Biome clean on changed files.

Link to Devin session: https://app.devin.ai/sessions/3e8361e78fe04403aea1c218fbdd814a


Open in Devin Review

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@nitpickybot nitpickybot Bot 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.

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)

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

Copy link
Copy Markdown
Contributor Author

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 bugs or issues to report.

Open in Devin Review

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Docs Generation Benchmark Results

Comparing PR branch against median of 5 nightly run(s) on main (latest: 2026-07-22T05:02:14Z).

Fixture main PR Delta
docs 239.7s (n=5) 244.1s (35 versions) +4.4s (+1.8%)

Docs generation runs fern generate --docs --preview end-to-end against the benchmark fixture with 35 API versions (each version: markdown processing + OpenAPI-to-IR + FDR upload).
Delta is computed against the nightly baseline on main.
Baseline from nightly run(s) on main (latest: 2026-07-22T05:02:14Z). Trigger benchmark-baseline to refresh.
Last updated: 2026-07-22 21:54 UTC

@github-actions

Copy link
Copy Markdown
Contributor

SDK Generation Benchmark Results

Comparing PR branch against median of 5 nightly run(s) on main (latest: 2026-07-22T05:02:14Z).

Full benchmark table (click to expand)
Generator Spec main (generator) main (E2E) PR (generator) Delta
csharp-sdk square 81s (n=5) 113s (n=3) 50s -31s (-38.3%)
go-sdk square 137s (n=5) 295s (n=5) 102s -35s (-25.5%)
java-sdk square 195s (n=5) 233s (n=5) 220s +25s (+12.8%)
php-sdk square 61s (n=5) 81s (n=3) 43s -18s (-29.5%)
python-sdk square 144s (n=5) 202s (n=5) 138s -6s (-4.2%)
ruby-sdk-v2 square 99s (n=5) 124s (n=5) 83s -16s (-16.2%)
rust-sdk square 215s (n=5) 178s (n=5) 201s -14s (-6.5%)
swift-sdk square 57s (n=5) 342s (n=5) 55s -2s (-3.5%)
ts-sdk square 147s (n=5) 180s (n=5) 125s -22s (-15.0%)

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 fern generate). main (E2E): full customer-observable time including build/test scripts (nightly baseline, informational). Delta is computed against generator-only baseline.
⚠️ = generation exited with a non-zero exit code (timing may not reflect a successful run).
Baseline from nightly runs on main (latest: 2026-07-22T05:02:14Z). Trigger benchmark-baseline to refresh.
Last updated: 2026-07-22 21:55 UTC

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