Skip to content

Commit

Permalink
fix: use the random flag in create html output (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
Skarlso authored Oct 15, 2024
1 parent 37bf269 commit 545546a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/crd.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func runGenerate(_ *cobra.Command, _ []string) error {
}
}

return pkg.RenderContent(w, crds, crdArgs.comments, crdArgs.minimal)
return pkg.RenderContent(w, crds, crdArgs.comments, crdArgs.minimal, crdArgs.skipRandom)
}

var errs []error //nolint:prealloc // nope
Expand Down
3 changes: 3 additions & 0 deletions docs/release_notes/v1.0.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Release v1.0.1

Fix ignoring the random flag for HTML output.
4 changes: 2 additions & 2 deletions pkg/create_html_output.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ func LoadTemplates() error {
}

// RenderContent creates an HTML website from the CRD content.
func RenderContent(w io.WriteCloser, crds []*SchemaType, comments, minimal bool) (err error) {
func RenderContent(w io.WriteCloser, crds []*SchemaType, comments, minimal, random bool) (err error) {
allViews := make([]ViewPage, 0, len(crds))

for _, crd := range crds {
versions := make([]Version, 0)
parser := NewParser(crd.Group, crd.Kind, comments, minimal, false)
parser := NewParser(crd.Group, crd.Kind, comments, minimal, random)

for _, version := range crd.Versions {
v, err := generate(version.Name, crd.Group, crd.Kind, version.Schema, minimal, parser)
Expand Down

0 comments on commit 545546a

Please sign in to comment.