@shoalrun/cli 0.1.0-beta.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/CODE-REFERENCES.md +137 -0
- package/README.md +8 -5
- package/adapters/python/requirements.txt +1 -0
- package/adapters/python/shoalrun_reference.py +234 -0
- package/agent-docs/.well-known/shoalrun/navigation/project-updates-50f26fe22670.txt +4 -2
- package/agent-docs/SNAPSHOT.json +5 -5
- package/agent-docs/about.md +3 -3
- package/agent-docs/api-docs/code-reference-settings.md +160 -0
- package/agent-docs/api-docs/code-reference-settings.sections/catalog-settings.md +50 -0
- package/agent-docs/api-docs/code-reference-settings.sections/complete-reference-page.md +46 -0
- package/agent-docs/api-docs/code-reference-settings.sections/converter-snapshot.md +58 -0
- package/agent-docs/api-docs/code-reference-settings.sections/descriptions-type-links-and-source-links.md +40 -0
- package/agent-docs/api-docs/code-reference-settings.sections/html-markdown-and-agents.md +38 -0
- package/agent-docs/api-docs/code-reference-settings.sections/metadata-and-selection.md +38 -0
- package/agent-docs/api-docs/code-reference-settings.sections/publication-sources.md +54 -0
- package/agent-docs/api-docs/code-reference-settings.sections/python-adapter-limits.md +38 -0
- package/agent-docs/api-docs/code-reference-settings.sections/related-reading.md +32 -0
- package/agent-docs/api-docs/code-reference-settings.sections/symbol-fields.md +56 -0
- package/agent-docs/api-docs/code-references.md +143 -0
- package/agent-docs/author/agent-overview.md +2 -2
- package/agent-docs/changelog/code-api-references.md +44 -0
- package/agent-docs/changelog.md +9 -1
- package/agent-docs/cli.md +11 -1
- package/agent-docs/cli.sections/audit-a-project-and-api-sources.md +1 -1
- package/agent-docs/cli.sections/author-pages.md +1 -1
- package/agent-docs/cli.sections/build-and-serve.md +1 -1
- package/agent-docs/cli.sections/inspect-config-and-operations.md +1 -1
- package/agent-docs/cli.sections/npm-scripts-in-this-repository.md +1 -1
- package/agent-docs/cli.sections/related-reading.md +1 -1
- package/agent-docs/cli.sections/search-and-chat.md +1 -1
- package/agent-docs/cli.sections/start-a-project.md +1 -1
- package/agent-docs/cli.sections/validate-code-reference-snapshots.md +41 -0
- package/agent-docs/cli.sections/working-tree-authoring-tools.md +1 -1
- package/agent-docs/config/apis.md +5 -1
- package/agent-docs/config/examples.md +3 -3
- package/agent-docs/config/examples.sections/feature-showcase.md +3 -3
- package/agent-docs/config/examples.sections/minimal-site.md +2 -2
- package/agent-docs/config/examples.sections/multilingual-help-center.md +2 -2
- package/agent-docs/config/examples.sections/parcel-api-documentation.md +2 -2
- package/agent-docs/config/examples.sections/related-reading.md +2 -2
- package/agent-docs/config/examples.sections/shared-company-preset.md +2 -2
- package/agent-docs/config.md +2 -2
- package/agent-docs/configuration.md +2 -2
- package/agent-docs/configuration.sections/build-several-sites-from-shared-content.md +1 -1
- package/agent-docs/configuration.sections/change-inherited-lists-deliberately.md +1 -1
- package/agent-docs/configuration.sections/extract-a-section-with-include.md +1 -1
- package/agent-docs/configuration.sections/inspect-and-validate-changes.md +1 -1
- package/agent-docs/configuration.sections/related-reading.md +1 -1
- package/agent-docs/configuration.sections/separate-config-inheritance-from-page-metadata.md +1 -1
- package/agent-docs/configuration.sections/share-defaults-through-extends.md +1 -1
- package/agent-docs/configuration.sections/start-with-one-working-file.md +2 -2
- package/agent-docs/configuration.sections/understand-the-three-stages.md +1 -1
- package/agent-docs/configuration.sections/understand-where-paths-point.md +1 -1
- package/agent-docs/documents.json +609 -215
- package/agent-docs/features.md +3 -2
- package/agent-docs/provenance.json +6 -6
- package/agent-docs/publish/api-references.md +3 -1
- package/agent-docs/publish/api-references.sections/author-the-reference-page.md +3 -1
- package/agent-docs/publish/api-references.sections/build-and-verify-the-output.md +3 -1
- package/agent-docs/publish/api-references.sections/inspect-the-machine-readable-contract.md +3 -1
- package/agent-docs/publish/api-references.sections/next-steps.md +3 -1
- package/agent-docs/publish/api-references.sections/preview-a-small-api-reference.md +3 -1
- package/agent-docs/publish/api-references.sections/put-the-spec-in-your-project.md +3 -1
- package/agent-docs/publish/api-references.sections/register-the-operation.md +3 -1
- package/agent-docs/publish/api-references.sections/related-reading.md +3 -1
- package/agent-docs/publish/api-references.sections/review-imported-content-before-publishing.md +3 -1
- package/agent-docs/publish/api-references.sections/what-readers-get.md +3 -1
- package/agent-docs/search-index.json +1 -1
- package/agent-docs/start.md +3 -3
- package/agent-docs/start.sections/add-the-page-to-navigation.md +2 -2
- package/agent-docs/start.sections/build-and-check-both-outputs.md +2 -2
- package/agent-docs/start.sections/build-this-site.md +2 -2
- package/agent-docs/start.sections/check-writing-style.md +2 -2
- package/agent-docs/start.sections/create-a-page.md +2 -2
- package/agent-docs/start.sections/make-it-yours.md +2 -2
- package/agent-docs/start.sections/migrating-from-github-packages.md +2 -2
- package/agent-docs/start.sections/prerequisites.md +2 -2
- package/agent-docs/start.sections/related-reading.md +2 -2
- package/agent-docs/start.sections/start-your-own-project.md +3 -3
- package/agent-docs/status.md +6 -4
- package/agent-docs/styling/themes.md +7 -3
- package/agent-docs/what-is-shoalrun.md +2 -2
- package/dist/artifact-bundle.d.ts +1 -0
- package/dist/artifact-bundle.js +11 -3
- package/dist/cli-discovery.d.ts +1 -1
- package/dist/cli-discovery.js +1 -0
- package/dist/cli.js +7 -0
- package/dist/code-reference-model.d.ts +85 -0
- package/dist/code-reference-model.js +73 -0
- package/dist/code-references.d.ts +23 -0
- package/dist/code-references.js +371 -0
- package/dist/compiler-config.d.ts +1 -0
- package/dist/compiler.js +4 -3
- package/dist/config.js +1 -1
- package/dist/content-source.d.ts +1 -0
- package/dist/content-workspace.d.ts +1 -0
- package/dist/content-workspace.js +2 -0
- package/dist/fonts.d.ts +9 -0
- package/dist/fonts.js +58 -3
- package/dist/page-materialization.js +3 -2
- package/dist/page-renderer.d.ts +1 -0
- package/dist/page-renderer.js +3 -1
- package/dist/publication-render.d.ts +2 -1
- package/dist/publication-render.js +2 -2
- package/dist/representation-tree.js +4 -0
- package/examples/code-references/content/start.md +53 -0
- package/examples/code-references/docs.config.yaml +262 -0
- package/examples/code-references/python/orchard/__init__.py +11 -0
- package/examples/code-references/python/orchard/client.py +212 -0
- package/examples/code-references/python/orchard/errors.py +31 -0
- package/examples/code-references/python/orchard/models.py +69 -0
- package/examples/code-references/python/orchard/pagination.py +39 -0
- package/examples/code-references/reference.json +1244 -0
- package/package.json +8 -1
- package/schemas/code-reference.schema.json +306 -0
- package/skills/shoalrun-author/SKILL.md +4 -0
- package/skills/shoalrun-author/references/code-api-references.md +15 -0
- package/styles/site.css +61 -2
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: reference.code-api-references
|
|
3
|
+
title: Code API reference settings
|
|
4
|
+
summary: Catalog configuration, converter snapshots, Python extraction limits,
|
|
5
|
+
and generated reference behavior.
|
|
6
|
+
type: reference
|
|
7
|
+
area: api
|
|
8
|
+
subarea: api-generation
|
|
9
|
+
canonical: /api-docs/code-reference-settings
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Code API reference settings
|
|
13
|
+
|
|
14
|
+
> Documentation index: [llms.min.txt](https://www.shoalrun.com/llms.min.txt) · Document manifest: [documents.json](https://www.shoalrun.com/documents.json)
|
|
15
|
+
|
|
16
|
+
Navigation section: [Docs](https://www.shoalrun.com/.well-known/shoalrun/navigation/docs-50f26fe22670.txt) (ID: docs). [All sections and pages](https://www.shoalrun.com/llms.min.txt)
|
|
17
|
+
|
|
18
|
+
Breadcrumbs: [Docs](https://www.shoalrun.com/what-is-shoalrun.md) > Document an API > Code API reference settings
|
|
19
|
+
|
|
20
|
+
**Updated: 2026-11-06.**
|
|
21
|
+
|
|
22
|
+
**Available since: 1.0.0.**
|
|
23
|
+
|
|
24
|
+
`codeReferences` maps a catalog ID to a local converter snapshot and presentation settings. Start with [Generate code API references](https://www.shoalrun.com/api-docs/code-references.md) for a complete Python workflow. This setting is separate from `apis`, which registers OpenAPI sources.
|
|
25
|
+
|
|
26
|
+
## Catalog settings
|
|
27
|
+
|
|
28
|
+
Use these fields inside `codeReferences.<catalog-id>`. Catalog IDs use lowercase letters, numbers, and dashes, starting with a letter.
|
|
29
|
+
|
|
30
|
+
| Field | Meaning |
|
|
31
|
+
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
32
|
+
| `source` | `{ kind: file, path: ./reference.json }` for the default publication. Paths resolve relative to the declaring config file and must remain inside the project root. |
|
|
33
|
+
| `publications` | Explicit `{ product?, channel, version, language?, source }` bindings. Declare this or `source`, not both. |
|
|
34
|
+
| `layout` | `symbols` (default), `classes`, or `modules`. Changes inline grouping while retaining individual symbol pages. |
|
|
35
|
+
| `pathPrefix` | Prefix for generated symbol slugs; defaults to `/reference/code`. Explicit symbol slugs take precedence. |
|
|
36
|
+
| `include`, `exclude` | Exact symbol IDs to select. Every listed ID must exist. Private symbols and descendants of private symbols aren't published. |
|
|
37
|
+
| `symbols` | Per-symbol `{ documentId?, slug?, metadata? }` overrides. |
|
|
38
|
+
| `metadata` | Ordinary page metadata, including taxonomy, reader filters, `shared`, and feature requirements. Project defaults and enforced metadata still apply. |
|
|
39
|
+
| `sourceLink.baseUrl` | Optional HTTPS repository directory URL. Must omit credentials, query strings, and fragments. |
|
|
40
|
+
| `singlePage` | An optional object defining a complete reference page. Omit it or use `false` to disable it. |
|
|
41
|
+
|
|
42
|
+
Generated pages have `type: code-reference`. Default document IDs combine the catalog and symbol IDs; IDs outside the simple identifier character set use a deterministic digest. Default slugs combine the path prefix, normalized symbol ID, and a digest. Use explicit overrides when a public URL or content-delivery identity must survive a symbol rename.
|
|
43
|
+
|
|
44
|
+
## Complete reference page
|
|
45
|
+
|
|
46
|
+
The `singlePage` object accepts these fields. No complete page is emitted when its selection contains no eligible symbols.
|
|
47
|
+
|
|
48
|
+
| Field | Default or behavior |
|
|
49
|
+
| ------------ | ----------------------------------------------------- |
|
|
50
|
+
| `documentId` | `reference.<catalog-id>.complete` |
|
|
51
|
+
| `slug` | `<pathPrefix>/all` |
|
|
52
|
+
| `title` | `Complete API reference` |
|
|
53
|
+
| `summary` | `Classes, functions, and fields in this publication.` |
|
|
54
|
+
| `metadata` | Overrides the catalog's metadata for this page. |
|
|
55
|
+
|
|
56
|
+
Grouped and complete pages use outline depth two unless frontmatter supplies another depth. Each embedded symbol gets a section heading. Links to embedded symbols target that section; ordinary symbol URLs remain valid for external links and content delivery.
|
|
57
|
+
|
|
58
|
+
## Publication sources
|
|
59
|
+
|
|
60
|
+
Bind a snapshot to each interface release. This example assumes the `sdk` product and versions already exist in `publications`:
|
|
61
|
+
|
|
62
|
+
```yaml
|
|
63
|
+
codeReferences:
|
|
64
|
+
sdk:
|
|
65
|
+
publications:
|
|
66
|
+
- product: sdk
|
|
67
|
+
channel: production
|
|
68
|
+
version: v1
|
|
69
|
+
language: en
|
|
70
|
+
source: { kind: file, path: ./reference/v1.json }
|
|
71
|
+
- product: sdk
|
|
72
|
+
channel: production
|
|
73
|
+
version: v2
|
|
74
|
+
language: en
|
|
75
|
+
source: { kind: file, path: ./reference/v2.json }
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Links, member tables, inline details, and complete references stay within the selected catalog and publication. A full snapshot isn't automatically published as a downloadable asset.
|
|
79
|
+
|
|
80
|
+
## Metadata and selection
|
|
81
|
+
|
|
82
|
+
A symbol's explicit `shared` or `requires` classification replaces the catalog's classification. Requirements are evaluated separately for each symbol; a parent's feature requirements don't automatically apply to its children. Strictly classified projects need an explicit classification for eligible public symbols and the complete page. Inherited frontmatter defaults don't satisfy that source-classification requirement.
|
|
83
|
+
|
|
84
|
+
Visibility, feature grants, access policy, and build reader-filter selection apply before references are combined. An excluded type is left as plain text rather than linked to unavailable content. Reader views remain browsing controls; build/profile selection determines which content is published.
|
|
85
|
+
|
|
86
|
+
## Converter snapshot
|
|
87
|
+
|
|
88
|
+
A converter writes JSON with `schemaVersion: 1`, `kind: shoalrun-code-reference`, a `programmingLanguage`, producer identity, and a nonempty `symbols` array. The package ships `schemas/code-reference.schema.json`; `shoalrun references check <snapshot.json>` also checks unique IDs, referenced targets, and acyclic parents.
|
|
89
|
+
|
|
90
|
+
This Kotlin-shaped example illustrates the shared contract. It doesn't imply a bundled Kotlin extractor:
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"schemaVersion": 1,
|
|
95
|
+
"kind": "shoalrun-code-reference",
|
|
96
|
+
"programmingLanguage": "kotlin",
|
|
97
|
+
"producer": { "name": "example-converter", "version": "1.0.0" },
|
|
98
|
+
"symbols": [{
|
|
99
|
+
"id": "example.greet",
|
|
100
|
+
"name": "greet",
|
|
101
|
+
"kind": "function",
|
|
102
|
+
"summary": "Create a greeting.",
|
|
103
|
+
"signatures": ["fun greet(name: String): String"],
|
|
104
|
+
"parameters": [{ "name": "name", "type": "String", "description": "Reader name." }],
|
|
105
|
+
"returns": { "type": "String", "description": "A greeting ready to display." }
|
|
106
|
+
}]
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Run a converter explicitly in your workflow, validate its output, then build. Shoalrun doesn't load executable converter plugins during compilation. JavaScript tools can import `validateCodeReference` from `@shoalrun/cli/references`.
|
|
111
|
+
|
|
112
|
+
## Symbol fields
|
|
113
|
+
|
|
114
|
+
Each symbol needs `id`, `name`, and `kind`. Supported kinds are `module`, `namespace`, `class`, `interface`, `enum`, `type`, `function`, `method`, `constructor`, `property`, `attribute`, and `constant`.
|
|
115
|
+
|
|
116
|
+
Use these optional fields to describe the interface without supplying executable markup or an arbitrary syntax tree:
|
|
117
|
+
|
|
118
|
+
| Field | Meaning |
|
|
119
|
+
| ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
120
|
+
| `parent` | ID of an existing parent symbol. Cycles aren't allowed. |
|
|
121
|
+
| `visibility` | `public` by default, or `private`. |
|
|
122
|
+
| `summary`, `description` | Short page summary and inert Markdown description. |
|
|
123
|
+
| `signatures` | Array of declaration strings, including overloads. |
|
|
124
|
+
| `parameters` | Array of `{ name, type?, description?, default? }`. |
|
|
125
|
+
| `returns`, `yields` | `{ type?, description? }`. |
|
|
126
|
+
| `raises` | Array of `{ name, type?, description?, default? }`. |
|
|
127
|
+
| `examples` | Array of `{ title?, code }`. Examples aren't executed. |
|
|
128
|
+
| `annotation`, `required`, `default` | Field type, whether a value must be supplied, and its default source expression. Unknown requirements stay unmarked. Nullable doesn't mean optional. |
|
|
129
|
+
| `bases`, `constructorSignature` | Base-type strings and a constructor declaration for a class. |
|
|
130
|
+
| `typeReferences` | Mapping from exact type text to an existing symbol ID. Only eligible targets become links; Shoalrun doesn't guess short-name matches. |
|
|
131
|
+
| `seeAlso` | Existing symbol IDs for related reference links. |
|
|
132
|
+
| `source` | `{ path, line? }` with a relative provenance path and optional positive line number. |
|
|
133
|
+
|
|
134
|
+
The snapshot can also include a SHA-256 `sourceDigest`. Unknown fields are rejected. Snapshots are limited to 10,000 symbols and 32 MiB; individual text fields have schema limits.
|
|
135
|
+
|
|
136
|
+
## Descriptions, type links, and source links
|
|
137
|
+
|
|
138
|
+
Descriptions don't run MDX or expand project directives. Raw HTML is stripped. Use `[Record](symbol:example.Record)` for a symbol link within the same catalog and publication. External links support HTTPS and mailto; relative links and images aren't supported.
|
|
139
|
+
|
|
140
|
+
Explicit type references create links in parameter, return, yield, base-class, exception, and field information. Signatures remain copyable code. The Python adapter resolves supported local annotation targets statically and keeps unknown or external targets unlinked.
|
|
141
|
+
|
|
142
|
+
Set `sourceLink.baseUrl` to a repository URL ending at the directory that contains the relative source paths. Include an immutable commit or release in that URL. A source path `sdk/models.py` with line `12` is appended as `/sdk/models.py#L12`. Shoalrun doesn't fetch or publish source files. Without this setting, source links are omitted.
|
|
143
|
+
|
|
144
|
+
## Python adapter limits
|
|
145
|
+
|
|
146
|
+
The packaged adapter requires Python 3.11 or newer and `griffelib==2.4.1`. Its requirements file pins the dependency and archive hash. The source root must contain the requested local module and can't contain symlinks. Extraction rejects roots exceeding 10,000 Python source files or 32 MiB.
|
|
147
|
+
|
|
148
|
+
Extraction doesn't enable runtime inspection, extensions, external discovery, or alias resolution. The adapter skips aliases and underscore-prefixed members except constructors. It doesn't expand inherited members or execute decorators. Local constructors and supported simple dataclass constructors supply class signatures; unsupported cases stay unspecified. Factory defaults appear as `<factory>` in constructor signatures and retain the source expression in field details.
|
|
149
|
+
|
|
150
|
+
## HTML, Markdown, and agents
|
|
151
|
+
|
|
152
|
+
HTML shows symbol context, declarations, member tables, and detailed sections. The tables use local horizontal scrolling instead of shrinking the text on small screens; keyboard readers can focus the scroll region. Copy controls need JavaScript. Grouped pages and complete references keep their content readable without those controls.
|
|
153
|
+
|
|
154
|
+
Markdown and content exports retain declarations, descriptions, field facts, examples, and links with their resource identity and publication scope. They omit the site's styling and Copy buttons. Agents can read generated pages through discovery tools or content delivery without running the extractor. A caller can select the complete page for export or PDF preparation by its document ID; enabling that page doesn't prebuild PDFs.
|
|
155
|
+
|
|
156
|
+
## Related reading
|
|
157
|
+
|
|
158
|
+
### Next steps
|
|
159
|
+
|
|
160
|
+
- [Generate code API references](https://www.shoalrun.com/api-docs/code-references.md) — Extract a Python snapshot and preview both grouped and complete SDK references.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: reference.code-api-references
|
|
3
|
+
title: Code API reference settings
|
|
4
|
+
summary: Catalog configuration, converter snapshots, Python extraction limits,
|
|
5
|
+
and generated reference behavior.
|
|
6
|
+
type: reference
|
|
7
|
+
area: api
|
|
8
|
+
subarea: api-generation
|
|
9
|
+
canonical: /api-docs/code-reference-settings
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Code API reference settings
|
|
13
|
+
|
|
14
|
+
> Documentation index: [llms.min.txt](https://www.shoalrun.com/llms.min.txt) · Document manifest: [documents.json](https://www.shoalrun.com/documents.json)
|
|
15
|
+
|
|
16
|
+
Navigation section: [Docs](https://www.shoalrun.com/.well-known/shoalrun/navigation/docs-50f26fe22670.txt) (ID: docs). [All sections and pages](https://www.shoalrun.com/llms.min.txt)
|
|
17
|
+
|
|
18
|
+
Breadcrumbs: [Docs](https://www.shoalrun.com/what-is-shoalrun.md) > Document an API > Code API reference settings
|
|
19
|
+
|
|
20
|
+
**Updated: 2026-11-06.**
|
|
21
|
+
|
|
22
|
+
**Available since: 1.0.0.**
|
|
23
|
+
|
|
24
|
+
Parent page: [Full Markdown page](/api-docs/code-reference-settings.md)
|
|
25
|
+
|
|
26
|
+
**Page reading path** — these links apply to the full page.
|
|
27
|
+
|
|
28
|
+
**Next steps**
|
|
29
|
+
|
|
30
|
+
- [Generate code API references](https://www.shoalrun.com/api-docs/code-references.md) — Extract a Python snapshot and preview both grouped and complete SDK references.
|
|
31
|
+
|
|
32
|
+
`codeReferences` maps a catalog ID to a local converter snapshot and presentation settings. Start with [Generate code API references](https://www.shoalrun.com/api-docs/code-references.md) for a complete Python workflow. This setting is separate from `apis`, which registers OpenAPI sources.
|
|
33
|
+
|
|
34
|
+
## Catalog settings
|
|
35
|
+
|
|
36
|
+
Use these fields inside `codeReferences.<catalog-id>`. Catalog IDs use lowercase letters, numbers, and dashes, starting with a letter.
|
|
37
|
+
|
|
38
|
+
| Field | Meaning |
|
|
39
|
+
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
40
|
+
| `source` | `{ kind: file, path: ./reference.json }` for the default publication. Paths resolve relative to the declaring config file and must remain inside the project root. |
|
|
41
|
+
| `publications` | Explicit `{ product?, channel, version, language?, source }` bindings. Declare this or `source`, not both. |
|
|
42
|
+
| `layout` | `symbols` (default), `classes`, or `modules`. Changes inline grouping while retaining individual symbol pages. |
|
|
43
|
+
| `pathPrefix` | Prefix for generated symbol slugs; defaults to `/reference/code`. Explicit symbol slugs take precedence. |
|
|
44
|
+
| `include`, `exclude` | Exact symbol IDs to select. Every listed ID must exist. Private symbols and descendants of private symbols aren't published. |
|
|
45
|
+
| `symbols` | Per-symbol `{ documentId?, slug?, metadata? }` overrides. |
|
|
46
|
+
| `metadata` | Ordinary page metadata, including taxonomy, reader filters, `shared`, and feature requirements. Project defaults and enforced metadata still apply. |
|
|
47
|
+
| `sourceLink.baseUrl` | Optional HTTPS repository directory URL. Must omit credentials, query strings, and fragments. |
|
|
48
|
+
| `singlePage` | An optional object defining a complete reference page. Omit it or use `false` to disable it. |
|
|
49
|
+
|
|
50
|
+
Generated pages have `type: code-reference`. Default document IDs combine the catalog and symbol IDs; IDs outside the simple identifier character set use a deterministic digest. Default slugs combine the path prefix, normalized symbol ID, and a digest. Use explicit overrides when a public URL or content-delivery identity must survive a symbol rename.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: reference.code-api-references
|
|
3
|
+
title: Code API reference settings
|
|
4
|
+
summary: Catalog configuration, converter snapshots, Python extraction limits,
|
|
5
|
+
and generated reference behavior.
|
|
6
|
+
type: reference
|
|
7
|
+
area: api
|
|
8
|
+
subarea: api-generation
|
|
9
|
+
canonical: /api-docs/code-reference-settings
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Code API reference settings
|
|
13
|
+
|
|
14
|
+
> Documentation index: [llms.min.txt](https://www.shoalrun.com/llms.min.txt) · Document manifest: [documents.json](https://www.shoalrun.com/documents.json)
|
|
15
|
+
|
|
16
|
+
Navigation section: [Docs](https://www.shoalrun.com/.well-known/shoalrun/navigation/docs-50f26fe22670.txt) (ID: docs). [All sections and pages](https://www.shoalrun.com/llms.min.txt)
|
|
17
|
+
|
|
18
|
+
Breadcrumbs: [Docs](https://www.shoalrun.com/what-is-shoalrun.md) > Document an API > Code API reference settings
|
|
19
|
+
|
|
20
|
+
**Updated: 2026-11-06.**
|
|
21
|
+
|
|
22
|
+
**Available since: 1.0.0.**
|
|
23
|
+
|
|
24
|
+
Parent page: [Full Markdown page](/api-docs/code-reference-settings.md)
|
|
25
|
+
|
|
26
|
+
**Page reading path** — these links apply to the full page.
|
|
27
|
+
|
|
28
|
+
**Next steps**
|
|
29
|
+
|
|
30
|
+
- [Generate code API references](https://www.shoalrun.com/api-docs/code-references.md) — Extract a Python snapshot and preview both grouped and complete SDK references.
|
|
31
|
+
|
|
32
|
+
`codeReferences` maps a catalog ID to a local converter snapshot and presentation settings. Start with [Generate code API references](https://www.shoalrun.com/api-docs/code-references.md) for a complete Python workflow. This setting is separate from `apis`, which registers OpenAPI sources.
|
|
33
|
+
|
|
34
|
+
## Complete reference page
|
|
35
|
+
|
|
36
|
+
The `singlePage` object accepts these fields. No complete page is emitted when its selection contains no eligible symbols.
|
|
37
|
+
|
|
38
|
+
| Field | Default or behavior |
|
|
39
|
+
| ------------ | ----------------------------------------------------- |
|
|
40
|
+
| `documentId` | `reference.<catalog-id>.complete` |
|
|
41
|
+
| `slug` | `<pathPrefix>/all` |
|
|
42
|
+
| `title` | `Complete API reference` |
|
|
43
|
+
| `summary` | `Classes, functions, and fields in this publication.` |
|
|
44
|
+
| `metadata` | Overrides the catalog's metadata for this page. |
|
|
45
|
+
|
|
46
|
+
Grouped and complete pages use outline depth two unless frontmatter supplies another depth. Each embedded symbol gets a section heading. Links to embedded symbols target that section; ordinary symbol URLs remain valid for external links and content delivery.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: reference.code-api-references
|
|
3
|
+
title: Code API reference settings
|
|
4
|
+
summary: Catalog configuration, converter snapshots, Python extraction limits,
|
|
5
|
+
and generated reference behavior.
|
|
6
|
+
type: reference
|
|
7
|
+
area: api
|
|
8
|
+
subarea: api-generation
|
|
9
|
+
canonical: /api-docs/code-reference-settings
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Code API reference settings
|
|
13
|
+
|
|
14
|
+
> Documentation index: [llms.min.txt](https://www.shoalrun.com/llms.min.txt) · Document manifest: [documents.json](https://www.shoalrun.com/documents.json)
|
|
15
|
+
|
|
16
|
+
Navigation section: [Docs](https://www.shoalrun.com/.well-known/shoalrun/navigation/docs-50f26fe22670.txt) (ID: docs). [All sections and pages](https://www.shoalrun.com/llms.min.txt)
|
|
17
|
+
|
|
18
|
+
Breadcrumbs: [Docs](https://www.shoalrun.com/what-is-shoalrun.md) > Document an API > Code API reference settings
|
|
19
|
+
|
|
20
|
+
**Updated: 2026-11-06.**
|
|
21
|
+
|
|
22
|
+
**Available since: 1.0.0.**
|
|
23
|
+
|
|
24
|
+
Parent page: [Full Markdown page](/api-docs/code-reference-settings.md)
|
|
25
|
+
|
|
26
|
+
**Page reading path** — these links apply to the full page.
|
|
27
|
+
|
|
28
|
+
**Next steps**
|
|
29
|
+
|
|
30
|
+
- [Generate code API references](https://www.shoalrun.com/api-docs/code-references.md) — Extract a Python snapshot and preview both grouped and complete SDK references.
|
|
31
|
+
|
|
32
|
+
`codeReferences` maps a catalog ID to a local converter snapshot and presentation settings. Start with [Generate code API references](https://www.shoalrun.com/api-docs/code-references.md) for a complete Python workflow. This setting is separate from `apis`, which registers OpenAPI sources.
|
|
33
|
+
|
|
34
|
+
## Converter snapshot
|
|
35
|
+
|
|
36
|
+
A converter writes JSON with `schemaVersion: 1`, `kind: shoalrun-code-reference`, a `programmingLanguage`, producer identity, and a nonempty `symbols` array. The package ships `schemas/code-reference.schema.json`; `shoalrun references check <snapshot.json>` also checks unique IDs, referenced targets, and acyclic parents.
|
|
37
|
+
|
|
38
|
+
This Kotlin-shaped example illustrates the shared contract. It doesn't imply a bundled Kotlin extractor:
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"schemaVersion": 1,
|
|
43
|
+
"kind": "shoalrun-code-reference",
|
|
44
|
+
"programmingLanguage": "kotlin",
|
|
45
|
+
"producer": { "name": "example-converter", "version": "1.0.0" },
|
|
46
|
+
"symbols": [{
|
|
47
|
+
"id": "example.greet",
|
|
48
|
+
"name": "greet",
|
|
49
|
+
"kind": "function",
|
|
50
|
+
"summary": "Create a greeting.",
|
|
51
|
+
"signatures": ["fun greet(name: String): String"],
|
|
52
|
+
"parameters": [{ "name": "name", "type": "String", "description": "Reader name." }],
|
|
53
|
+
"returns": { "type": "String", "description": "A greeting ready to display." }
|
|
54
|
+
}]
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Run a converter explicitly in your workflow, validate its output, then build. Shoalrun doesn't load executable converter plugins during compilation. JavaScript tools can import `validateCodeReference` from `@shoalrun/cli/references`.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: reference.code-api-references
|
|
3
|
+
title: Code API reference settings
|
|
4
|
+
summary: Catalog configuration, converter snapshots, Python extraction limits,
|
|
5
|
+
and generated reference behavior.
|
|
6
|
+
type: reference
|
|
7
|
+
area: api
|
|
8
|
+
subarea: api-generation
|
|
9
|
+
canonical: /api-docs/code-reference-settings
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Code API reference settings
|
|
13
|
+
|
|
14
|
+
> Documentation index: [llms.min.txt](https://www.shoalrun.com/llms.min.txt) · Document manifest: [documents.json](https://www.shoalrun.com/documents.json)
|
|
15
|
+
|
|
16
|
+
Navigation section: [Docs](https://www.shoalrun.com/.well-known/shoalrun/navigation/docs-50f26fe22670.txt) (ID: docs). [All sections and pages](https://www.shoalrun.com/llms.min.txt)
|
|
17
|
+
|
|
18
|
+
Breadcrumbs: [Docs](https://www.shoalrun.com/what-is-shoalrun.md) > Document an API > Code API reference settings
|
|
19
|
+
|
|
20
|
+
**Updated: 2026-11-06.**
|
|
21
|
+
|
|
22
|
+
**Available since: 1.0.0.**
|
|
23
|
+
|
|
24
|
+
Parent page: [Full Markdown page](/api-docs/code-reference-settings.md)
|
|
25
|
+
|
|
26
|
+
**Page reading path** — these links apply to the full page.
|
|
27
|
+
|
|
28
|
+
**Next steps**
|
|
29
|
+
|
|
30
|
+
- [Generate code API references](https://www.shoalrun.com/api-docs/code-references.md) — Extract a Python snapshot and preview both grouped and complete SDK references.
|
|
31
|
+
|
|
32
|
+
`codeReferences` maps a catalog ID to a local converter snapshot and presentation settings. Start with [Generate code API references](https://www.shoalrun.com/api-docs/code-references.md) for a complete Python workflow. This setting is separate from `apis`, which registers OpenAPI sources.
|
|
33
|
+
|
|
34
|
+
## Descriptions, type links, and source links
|
|
35
|
+
|
|
36
|
+
Descriptions don't run MDX or expand project directives. Raw HTML is stripped. Use `[Record](symbol:example.Record)` for a symbol link within the same catalog and publication. External links support HTTPS and mailto; relative links and images aren't supported.
|
|
37
|
+
|
|
38
|
+
Explicit type references create links in parameter, return, yield, base-class, exception, and field information. Signatures remain copyable code. The Python adapter resolves supported local annotation targets statically and keeps unknown or external targets unlinked.
|
|
39
|
+
|
|
40
|
+
Set `sourceLink.baseUrl` to a repository URL ending at the directory that contains the relative source paths. Include an immutable commit or release in that URL. A source path `sdk/models.py` with line `12` is appended as `/sdk/models.py#L12`. Shoalrun doesn't fetch or publish source files. Without this setting, source links are omitted.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: reference.code-api-references
|
|
3
|
+
title: Code API reference settings
|
|
4
|
+
summary: Catalog configuration, converter snapshots, Python extraction limits,
|
|
5
|
+
and generated reference behavior.
|
|
6
|
+
type: reference
|
|
7
|
+
area: api
|
|
8
|
+
subarea: api-generation
|
|
9
|
+
canonical: /api-docs/code-reference-settings
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Code API reference settings
|
|
13
|
+
|
|
14
|
+
> Documentation index: [llms.min.txt](https://www.shoalrun.com/llms.min.txt) · Document manifest: [documents.json](https://www.shoalrun.com/documents.json)
|
|
15
|
+
|
|
16
|
+
Navigation section: [Docs](https://www.shoalrun.com/.well-known/shoalrun/navigation/docs-50f26fe22670.txt) (ID: docs). [All sections and pages](https://www.shoalrun.com/llms.min.txt)
|
|
17
|
+
|
|
18
|
+
Breadcrumbs: [Docs](https://www.shoalrun.com/what-is-shoalrun.md) > Document an API > Code API reference settings
|
|
19
|
+
|
|
20
|
+
**Updated: 2026-11-06.**
|
|
21
|
+
|
|
22
|
+
**Available since: 1.0.0.**
|
|
23
|
+
|
|
24
|
+
Parent page: [Full Markdown page](/api-docs/code-reference-settings.md)
|
|
25
|
+
|
|
26
|
+
**Page reading path** — these links apply to the full page.
|
|
27
|
+
|
|
28
|
+
**Next steps**
|
|
29
|
+
|
|
30
|
+
- [Generate code API references](https://www.shoalrun.com/api-docs/code-references.md) — Extract a Python snapshot and preview both grouped and complete SDK references.
|
|
31
|
+
|
|
32
|
+
`codeReferences` maps a catalog ID to a local converter snapshot and presentation settings. Start with [Generate code API references](https://www.shoalrun.com/api-docs/code-references.md) for a complete Python workflow. This setting is separate from `apis`, which registers OpenAPI sources.
|
|
33
|
+
|
|
34
|
+
## HTML, Markdown, and agents
|
|
35
|
+
|
|
36
|
+
HTML shows symbol context, declarations, member tables, and detailed sections. The tables use local horizontal scrolling instead of shrinking the text on small screens; keyboard readers can focus the scroll region. Copy controls need JavaScript. Grouped pages and complete references keep their content readable without those controls.
|
|
37
|
+
|
|
38
|
+
Markdown and content exports retain declarations, descriptions, field facts, examples, and links with their resource identity and publication scope. They omit the site's styling and Copy buttons. Agents can read generated pages through discovery tools or content delivery without running the extractor. A caller can select the complete page for export or PDF preparation by its document ID; enabling that page doesn't prebuild PDFs.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: reference.code-api-references
|
|
3
|
+
title: Code API reference settings
|
|
4
|
+
summary: Catalog configuration, converter snapshots, Python extraction limits,
|
|
5
|
+
and generated reference behavior.
|
|
6
|
+
type: reference
|
|
7
|
+
area: api
|
|
8
|
+
subarea: api-generation
|
|
9
|
+
canonical: /api-docs/code-reference-settings
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Code API reference settings
|
|
13
|
+
|
|
14
|
+
> Documentation index: [llms.min.txt](https://www.shoalrun.com/llms.min.txt) · Document manifest: [documents.json](https://www.shoalrun.com/documents.json)
|
|
15
|
+
|
|
16
|
+
Navigation section: [Docs](https://www.shoalrun.com/.well-known/shoalrun/navigation/docs-50f26fe22670.txt) (ID: docs). [All sections and pages](https://www.shoalrun.com/llms.min.txt)
|
|
17
|
+
|
|
18
|
+
Breadcrumbs: [Docs](https://www.shoalrun.com/what-is-shoalrun.md) > Document an API > Code API reference settings
|
|
19
|
+
|
|
20
|
+
**Updated: 2026-11-06.**
|
|
21
|
+
|
|
22
|
+
**Available since: 1.0.0.**
|
|
23
|
+
|
|
24
|
+
Parent page: [Full Markdown page](/api-docs/code-reference-settings.md)
|
|
25
|
+
|
|
26
|
+
**Page reading path** — these links apply to the full page.
|
|
27
|
+
|
|
28
|
+
**Next steps**
|
|
29
|
+
|
|
30
|
+
- [Generate code API references](https://www.shoalrun.com/api-docs/code-references.md) — Extract a Python snapshot and preview both grouped and complete SDK references.
|
|
31
|
+
|
|
32
|
+
`codeReferences` maps a catalog ID to a local converter snapshot and presentation settings. Start with [Generate code API references](https://www.shoalrun.com/api-docs/code-references.md) for a complete Python workflow. This setting is separate from `apis`, which registers OpenAPI sources.
|
|
33
|
+
|
|
34
|
+
## Metadata and selection
|
|
35
|
+
|
|
36
|
+
A symbol's explicit `shared` or `requires` classification replaces the catalog's classification. Requirements are evaluated separately for each symbol; a parent's feature requirements don't automatically apply to its children. Strictly classified projects need an explicit classification for eligible public symbols and the complete page. Inherited frontmatter defaults don't satisfy that source-classification requirement.
|
|
37
|
+
|
|
38
|
+
Visibility, feature grants, access policy, and build reader-filter selection apply before references are combined. An excluded type is left as plain text rather than linked to unavailable content. Reader views remain browsing controls; build/profile selection determines which content is published.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: reference.code-api-references
|
|
3
|
+
title: Code API reference settings
|
|
4
|
+
summary: Catalog configuration, converter snapshots, Python extraction limits,
|
|
5
|
+
and generated reference behavior.
|
|
6
|
+
type: reference
|
|
7
|
+
area: api
|
|
8
|
+
subarea: api-generation
|
|
9
|
+
canonical: /api-docs/code-reference-settings
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Code API reference settings
|
|
13
|
+
|
|
14
|
+
> Documentation index: [llms.min.txt](https://www.shoalrun.com/llms.min.txt) · Document manifest: [documents.json](https://www.shoalrun.com/documents.json)
|
|
15
|
+
|
|
16
|
+
Navigation section: [Docs](https://www.shoalrun.com/.well-known/shoalrun/navigation/docs-50f26fe22670.txt) (ID: docs). [All sections and pages](https://www.shoalrun.com/llms.min.txt)
|
|
17
|
+
|
|
18
|
+
Breadcrumbs: [Docs](https://www.shoalrun.com/what-is-shoalrun.md) > Document an API > Code API reference settings
|
|
19
|
+
|
|
20
|
+
**Updated: 2026-11-06.**
|
|
21
|
+
|
|
22
|
+
**Available since: 1.0.0.**
|
|
23
|
+
|
|
24
|
+
Parent page: [Full Markdown page](/api-docs/code-reference-settings.md)
|
|
25
|
+
|
|
26
|
+
**Page reading path** — these links apply to the full page.
|
|
27
|
+
|
|
28
|
+
**Next steps**
|
|
29
|
+
|
|
30
|
+
- [Generate code API references](https://www.shoalrun.com/api-docs/code-references.md) — Extract a Python snapshot and preview both grouped and complete SDK references.
|
|
31
|
+
|
|
32
|
+
`codeReferences` maps a catalog ID to a local converter snapshot and presentation settings. Start with [Generate code API references](https://www.shoalrun.com/api-docs/code-references.md) for a complete Python workflow. This setting is separate from `apis`, which registers OpenAPI sources.
|
|
33
|
+
|
|
34
|
+
## Publication sources
|
|
35
|
+
|
|
36
|
+
Bind a snapshot to each interface release. This example assumes the `sdk` product and versions already exist in `publications`:
|
|
37
|
+
|
|
38
|
+
```yaml
|
|
39
|
+
codeReferences:
|
|
40
|
+
sdk:
|
|
41
|
+
publications:
|
|
42
|
+
- product: sdk
|
|
43
|
+
channel: production
|
|
44
|
+
version: v1
|
|
45
|
+
language: en
|
|
46
|
+
source: { kind: file, path: ./reference/v1.json }
|
|
47
|
+
- product: sdk
|
|
48
|
+
channel: production
|
|
49
|
+
version: v2
|
|
50
|
+
language: en
|
|
51
|
+
source: { kind: file, path: ./reference/v2.json }
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Links, member tables, inline details, and complete references stay within the selected catalog and publication. A full snapshot isn't automatically published as a downloadable asset.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: reference.code-api-references
|
|
3
|
+
title: Code API reference settings
|
|
4
|
+
summary: Catalog configuration, converter snapshots, Python extraction limits,
|
|
5
|
+
and generated reference behavior.
|
|
6
|
+
type: reference
|
|
7
|
+
area: api
|
|
8
|
+
subarea: api-generation
|
|
9
|
+
canonical: /api-docs/code-reference-settings
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Code API reference settings
|
|
13
|
+
|
|
14
|
+
> Documentation index: [llms.min.txt](https://www.shoalrun.com/llms.min.txt) · Document manifest: [documents.json](https://www.shoalrun.com/documents.json)
|
|
15
|
+
|
|
16
|
+
Navigation section: [Docs](https://www.shoalrun.com/.well-known/shoalrun/navigation/docs-50f26fe22670.txt) (ID: docs). [All sections and pages](https://www.shoalrun.com/llms.min.txt)
|
|
17
|
+
|
|
18
|
+
Breadcrumbs: [Docs](https://www.shoalrun.com/what-is-shoalrun.md) > Document an API > Code API reference settings
|
|
19
|
+
|
|
20
|
+
**Updated: 2026-11-06.**
|
|
21
|
+
|
|
22
|
+
**Available since: 1.0.0.**
|
|
23
|
+
|
|
24
|
+
Parent page: [Full Markdown page](/api-docs/code-reference-settings.md)
|
|
25
|
+
|
|
26
|
+
**Page reading path** — these links apply to the full page.
|
|
27
|
+
|
|
28
|
+
**Next steps**
|
|
29
|
+
|
|
30
|
+
- [Generate code API references](https://www.shoalrun.com/api-docs/code-references.md) — Extract a Python snapshot and preview both grouped and complete SDK references.
|
|
31
|
+
|
|
32
|
+
`codeReferences` maps a catalog ID to a local converter snapshot and presentation settings. Start with [Generate code API references](https://www.shoalrun.com/api-docs/code-references.md) for a complete Python workflow. This setting is separate from `apis`, which registers OpenAPI sources.
|
|
33
|
+
|
|
34
|
+
## Python adapter limits
|
|
35
|
+
|
|
36
|
+
The packaged adapter requires Python 3.11 or newer and `griffelib==2.4.1`. Its requirements file pins the dependency and archive hash. The source root must contain the requested local module and can't contain symlinks. Extraction rejects roots exceeding 10,000 Python source files or 32 MiB.
|
|
37
|
+
|
|
38
|
+
Extraction doesn't enable runtime inspection, extensions, external discovery, or alias resolution. The adapter skips aliases and underscore-prefixed members except constructors. It doesn't expand inherited members or execute decorators. Local constructors and supported simple dataclass constructors supply class signatures; unsupported cases stay unspecified. Factory defaults appear as `<factory>` in constructor signatures and retain the source expression in field details.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: reference.code-api-references
|
|
3
|
+
title: Code API reference settings
|
|
4
|
+
summary: Catalog configuration, converter snapshots, Python extraction limits,
|
|
5
|
+
and generated reference behavior.
|
|
6
|
+
type: reference
|
|
7
|
+
area: api
|
|
8
|
+
subarea: api-generation
|
|
9
|
+
canonical: /api-docs/code-reference-settings
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Code API reference settings
|
|
13
|
+
|
|
14
|
+
> Documentation index: [llms.min.txt](https://www.shoalrun.com/llms.min.txt) · Document manifest: [documents.json](https://www.shoalrun.com/documents.json)
|
|
15
|
+
|
|
16
|
+
Navigation section: [Docs](https://www.shoalrun.com/.well-known/shoalrun/navigation/docs-50f26fe22670.txt) (ID: docs). [All sections and pages](https://www.shoalrun.com/llms.min.txt)
|
|
17
|
+
|
|
18
|
+
Breadcrumbs: [Docs](https://www.shoalrun.com/what-is-shoalrun.md) > Document an API > Code API reference settings
|
|
19
|
+
|
|
20
|
+
**Updated: 2026-11-06.**
|
|
21
|
+
|
|
22
|
+
**Available since: 1.0.0.**
|
|
23
|
+
|
|
24
|
+
Parent page: [Full Markdown page](/api-docs/code-reference-settings.md)
|
|
25
|
+
|
|
26
|
+
`codeReferences` maps a catalog ID to a local converter snapshot and presentation settings. Start with [Generate code API references](https://www.shoalrun.com/api-docs/code-references.md) for a complete Python workflow. This setting is separate from `apis`, which registers OpenAPI sources.
|
|
27
|
+
|
|
28
|
+
## Related reading
|
|
29
|
+
|
|
30
|
+
### Next steps
|
|
31
|
+
|
|
32
|
+
- [Generate code API references](https://www.shoalrun.com/api-docs/code-references.md) — Extract a Python snapshot and preview both grouped and complete SDK references.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: reference.code-api-references
|
|
3
|
+
title: Code API reference settings
|
|
4
|
+
summary: Catalog configuration, converter snapshots, Python extraction limits,
|
|
5
|
+
and generated reference behavior.
|
|
6
|
+
type: reference
|
|
7
|
+
area: api
|
|
8
|
+
subarea: api-generation
|
|
9
|
+
canonical: /api-docs/code-reference-settings
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Code API reference settings
|
|
13
|
+
|
|
14
|
+
> Documentation index: [llms.min.txt](https://www.shoalrun.com/llms.min.txt) · Document manifest: [documents.json](https://www.shoalrun.com/documents.json)
|
|
15
|
+
|
|
16
|
+
Navigation section: [Docs](https://www.shoalrun.com/.well-known/shoalrun/navigation/docs-50f26fe22670.txt) (ID: docs). [All sections and pages](https://www.shoalrun.com/llms.min.txt)
|
|
17
|
+
|
|
18
|
+
Breadcrumbs: [Docs](https://www.shoalrun.com/what-is-shoalrun.md) > Document an API > Code API reference settings
|
|
19
|
+
|
|
20
|
+
**Updated: 2026-11-06.**
|
|
21
|
+
|
|
22
|
+
**Available since: 1.0.0.**
|
|
23
|
+
|
|
24
|
+
Parent page: [Full Markdown page](/api-docs/code-reference-settings.md)
|
|
25
|
+
|
|
26
|
+
**Page reading path** — these links apply to the full page.
|
|
27
|
+
|
|
28
|
+
**Next steps**
|
|
29
|
+
|
|
30
|
+
- [Generate code API references](https://www.shoalrun.com/api-docs/code-references.md) — Extract a Python snapshot and preview both grouped and complete SDK references.
|
|
31
|
+
|
|
32
|
+
`codeReferences` maps a catalog ID to a local converter snapshot and presentation settings. Start with [Generate code API references](https://www.shoalrun.com/api-docs/code-references.md) for a complete Python workflow. This setting is separate from `apis`, which registers OpenAPI sources.
|
|
33
|
+
|
|
34
|
+
## Symbol fields
|
|
35
|
+
|
|
36
|
+
Each symbol needs `id`, `name`, and `kind`. Supported kinds are `module`, `namespace`, `class`, `interface`, `enum`, `type`, `function`, `method`, `constructor`, `property`, `attribute`, and `constant`.
|
|
37
|
+
|
|
38
|
+
Use these optional fields to describe the interface without supplying executable markup or an arbitrary syntax tree:
|
|
39
|
+
|
|
40
|
+
| Field | Meaning |
|
|
41
|
+
| ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
42
|
+
| `parent` | ID of an existing parent symbol. Cycles aren't allowed. |
|
|
43
|
+
| `visibility` | `public` by default, or `private`. |
|
|
44
|
+
| `summary`, `description` | Short page summary and inert Markdown description. |
|
|
45
|
+
| `signatures` | Array of declaration strings, including overloads. |
|
|
46
|
+
| `parameters` | Array of `{ name, type?, description?, default? }`. |
|
|
47
|
+
| `returns`, `yields` | `{ type?, description? }`. |
|
|
48
|
+
| `raises` | Array of `{ name, type?, description?, default? }`. |
|
|
49
|
+
| `examples` | Array of `{ title?, code }`. Examples aren't executed. |
|
|
50
|
+
| `annotation`, `required`, `default` | Field type, whether a value must be supplied, and its default source expression. Unknown requirements stay unmarked. Nullable doesn't mean optional. |
|
|
51
|
+
| `bases`, `constructorSignature` | Base-type strings and a constructor declaration for a class. |
|
|
52
|
+
| `typeReferences` | Mapping from exact type text to an existing symbol ID. Only eligible targets become links; Shoalrun doesn't guess short-name matches. |
|
|
53
|
+
| `seeAlso` | Existing symbol IDs for related reference links. |
|
|
54
|
+
| `source` | `{ path, line? }` with a relative provenance path and optional positive line number. |
|
|
55
|
+
|
|
56
|
+
The snapshot can also include a SHA-256 `sourceDigest`. Unknown fields are rejected. Snapshots are limited to 10,000 symbols and 32 MiB; individual text fields have schema limits.
|