diff --git a/themes/geekboot/layouts/partials/apiBuilder/getVersionAndSchema.html b/themes/geekboot/layouts/partials/apiBuilder/getVersionAndSchema.html index d84dc6e85..502c592e6 100644 --- a/themes/geekboot/layouts/partials/apiBuilder/getVersionAndSchema.html +++ b/themes/geekboot/layouts/partials/apiBuilder/getVersionAndSchema.html @@ -4,11 +4,19 @@ {{ $deprecated := false }} {{ range .versions }} - {{ if index . "storage" }} + {{ if and (index . "storage") (not .deprecated) }} {{ $version = .name }} {{ $schema = .schema }} {{ $deprecated = .deprecated }} - {{ else if (and (index . "served") (not $version)) }} + {{ else if and (index . "served") (not .deprecated) (not $version) }} + {{ $version = .name }} + {{ $schema = .schema }} + {{ $deprecated = .deprecated }} + {{ else if and (index . "storage") (not $version) }} + {{ $version = .name }} + {{ $schema = .schema }} + {{ $deprecated = .deprecated }} + {{ else if and (index . "served") (not $version) }} {{ $version = .name }} {{ $schema = .schema }} {{ $deprecated = .deprecated }} diff --git a/themes/geekboot/layouts/partials/apiBuilder/printGKVExpander.html b/themes/geekboot/layouts/partials/apiBuilder/printGKVExpander.html index 7e3c58332..f53d30631 100644 --- a/themes/geekboot/layouts/partials/apiBuilder/printGKVExpander.html +++ b/themes/geekboot/layouts/partials/apiBuilder/printGKVExpander.html @@ -8,11 +8,11 @@ {{/* Collapse/Expand Button and Kind name */}}
diff --git a/themes/geekboot/layouts/partials/crds.html b/themes/geekboot/layouts/partials/crds.html index ac06aca87..2baf7002e 100644 --- a/themes/geekboot/layouts/partials/crds.html +++ b/themes/geekboot/layouts/partials/crds.html @@ -22,47 +22,49 @@ {{/* bigName is the kind length limit to change CSS styles when it needs to be truncated */}} {{ $bigName := partial "apiBuilder/checkBigName" $kind }} + {{/* Iterate over each served version and create separate entries */}} + {{ range $versionItem := $crdContent.spec.versions }} + {{ if $versionItem.served }} + {{ $schema := $versionItem.schema.openAPIV3Schema }} + {{ $version := $versionItem.name }} + {{ $deprecated := $versionItem.deprecated }} + {{ $description := $schema.description }} - {{/* Find the active version. We prefer the "storage: true" value but use "served: true" as a backup */}} - {{ $versionAndSchema := partial "apiBuilder/getVersionAndSchema" $crdContent.spec }} - {{ $schema := $versionAndSchema.schema.openAPIV3Schema }} - {{ $version := $versionAndSchema.version }} - {{ $deprecated := $versionAndSchema.deprecated }} - {{ $description := $schema.description }} + {{/* The div containing the entire CRD information including the Expand All/Collapse All row */}} +