Skip to content

[v16] Fix operator docs reference generator bug#46768

Merged
ptgott merged 1 commit intobranch/v16from
bot/backport-46732-branch/v16
Sep 19, 2024
Merged

[v16] Fix operator docs reference generator bug#46768
ptgott merged 1 commit intobranch/v16from
bot/backport-46732-branch/v16

Conversation

@ptgott
Copy link
Copy Markdown
Contributor

@ptgott ptgott commented Sep 19, 2024

Backport #46732 to branch/v16

In the reference page for one Kubernetes operator resource, some
Markdown links are malformed.

The issue is that some fields of custom resource definitions used by the
operator consist of arrays of anonymous objects with fields that are
also objects. When creating docs based on these fields, the operator
resource docs generator creates a malformed link reference.

This change modifies the generator to replace any spaces with hyphens
before outputting link references, causing the resulting internal links
to work correctly.

This change also does some light refactoring to remove an unnecessary
`switch` statement.
@ptgott ptgott added the no-changelog Indicates that a PR does not require a changelog entry label Sep 19, 2024
@github-actions
Copy link
Copy Markdown
Contributor

🤖 Vercel preview here: https://docs-le2itw59l-goteleport.vercel.app/docs/ver/preview

@ptgott ptgott added this pull request to the merge queue Sep 19, 2024
Merged via the queue into branch/v16 with commit ba347c8 Sep 19, 2024
@ptgott ptgott deleted the bot/backport-46732-branch/v16 branch September 19, 2024 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport documentation no-changelog Indicates that a PR does not require a changelog entry size/sm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants