Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linkForType and typeDisplayName wrong when a field is a slice of pointers #49

Closed
makkes opened this issue Apr 29, 2022 · 1 comment
Closed

Comments

@makkes
Copy link

makkes commented Apr 29, 2022

Given this CRD in Go:

type GitRepositoryStatus struct {
[...]
	// Conditions holds the conditions for the GitRepository.
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// Artifact represents the last successful GitRepository reconciliation.
	// +optional
	Artifact *Artifact `json:"artifact,omitempty"`

	// IncludedArtifacts contains a list of the last successfully included
	// Artifacts as instructed by GitRepositorySpec.Include.
	// +optional
	IncludedArtifacts []*Artifact `json:"includedArtifacts,omitempty"`
}

the output of gen-crd-api-reference-docs is something like

<a href="#source.toolkit.fluxcd.io/v1beta2.*./api/v1beta2.Artifact">[]*./api/v1beta2.Artifact</a>

where the href part is rendered using linkForType .Type and the text is rendered using typeDisplayName .Type.

You can see this happening in the Flux API docs but also in other projects like vitess (search for "[]*").

@makkes
Copy link
Author

makkes commented Apr 29, 2022

Hu, looks like this is a duplicate of #36. @ahmetb is there a chance of cutting a release anytime soon?

@makkes makkes closed this as completed Apr 29, 2022
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

No branches or pull requests

1 participant