UI contract.
Registry API reference UI
Platform spec article
Registry API reference UI
Spec standingStandard
-
api.json primary
Context
Decision
api.json is primary structured docs contract.
Consequences
Templates exempt.
Verification anchors
doc emission; pckg UI.
-
Hub authority
Context
Informal notes.
Decision
Hub and ADRs supersede crate notes.
Consequences
Spec leads code.
Verification anchors
content verify.
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
| Section id | Required | Found |
|---|---|---|
what-this-feature-specifies | yes | yes |
implementation-anchors | yes | yes |
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
What this covers
Section titled “What this covers”How the pckg registry renders published package documentation as an API reference (Microsoft .NET API Docs–style), using api.json as the sole structure driver.
Page layout
Section titled “Page layout”| Region | Content |
|---|---|
| Header | Package id, version, primary symbol search |
| Left rail | Library tree — collapsible modules, optional dependency groups, kind folders (Types, Enums, Contracts, Functions) |
| Center | Selected symbol: signature, type links, structured doc, docMarkdown body |
| Right rail | In-page table of contents from markdown headings |
| Overflow | Flat symbol grid and kind filters (secondary to the tree) |
The main content column must stay aligned beside the left rail (not displaced below it).
URL routes
Section titled “URL routes”| Route | Purpose |
|---|---|
`/docs/{package}@{version}` | Package docs landing; default tree selection |
`/docs/{package}@{version}/api/{qualifiedName}` | Deep link to one API row (qualifiedName percent-encoded) |
`/docs/{package}@{version}/search/{query}` | Initial symbol search filter |
The version segment may be latest or an exact registry version.
Library tree algorithm
Section titled “Library tree algorithm”- Deserialize
api.jsonwithnavigationModel: "graph-v1"andschemaVersion >= 3. - Build parent/child edges from
parentId/memberIdsonly (design model). - Include only explorer kinds in the tree (
module,type,enum,contract,function). - Under each
modulenode, group explorer children into UI folders bykind. - When
declaringPackageis present and differs from the page package, group under Dependencies → that package id before module nesting.
Legacy artifacts without module parenting may synthesize module edges from modulePath until re-published; emitters should not rely on this path.
Type and cross-package links
Section titled “Type and cross-package links”- In-package types: navigate via
refItemIdwhen set; otherwise select byqualifiedName. - External types (
declaringPackage≠ current package): link to`/docs/{declaringPackage}@{version}/api/{qualifiedName}`(same version segment as the host page when possible). - Markdown
@reflinks packed at publish time must use the same qualified-name rules as the design model.
Implementation anchors
Section titled “Implementation anchors”- UI:
pckg/src/Server/Components/Docs/(PackageDocs,ApiDocNavigationBuilder,DocsView) - API:
GET /api/packages/{id}/versions/{ver}/docs/structured - Pack:
.beskid/docs/api.jsoninside.bpkartifacts