Skip to content

Ignore knownTypes for local types#197

Open
stephenfin wants to merge 2 commits intoelastic:masterfrom
stephenfin:local-types
Open

Ignore knownTypes for local types#197
stephenfin wants to merge 2 commits intoelastic:masterfrom
stephenfin:local-types

Conversation

@stephenfin
Copy link
Copy Markdown

@stephenfin stephenfin commented Apr 30, 2026

knownTypes entries were being applied to all types regardless of whether they were local to the source package or imported from another package. This caused local types that appeared in knownTypes to be rendered with external links rather than local anchor links, breaking in-page navigation when rendered locally.

Move the knownTypes lookup inside the IsBasic/Imported branch so that it only applies to types that cannot resolve to a local anchor.

This was spotted while attempting to migrate https://github.com/kubernetes-sigs/cluster-api-provider-openstack from https://github.com/ahmetb/gen-crd-api-reference-docs to this project.

@cla-checker-service
Copy link
Copy Markdown

cla-checker-service Bot commented Apr 30, 2026

💚 CLA has been signed

Signed-off-by: Stephen Finucane <stephen@that.guru>
knownTypes entries were being applied to all types regardless of whether
they were local to the source package or imported from another package.
This caused local types that appeared in knownTypes to be rendered with
external links rather than local anchor links, breaking in-page
navigation when rendered locally.

Move the lookup inside the IsBasic/Imported branch so that it only
applies to types that cannot resolve to a local anchor.

Signed-off-by: Stephen Finucane <stephen@that.guru>
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