DataSource: Fix openapi spec (#112150)

This commit is contained in:
Ryan McKinley
2025-10-08 14:36:24 +03:00
committed by GitHub
parent 047c51be01
commit 13a3c46079
6 changed files with 1191 additions and 12 deletions
+2 -3
View File
@@ -201,10 +201,9 @@ func getOpenAPIPostProcessor(version string, builders []APIGroupBuilder, gvs []s
keep := make([]map[string]any, 0, len(gvks))
for _, val := range gvks {
gvk, ok := val.(map[string]any)
if ok && gvk["version"] == "__internal" {
continue
if ok && gvk["group"] == gv.Group && gvk["version"] != "__internal" {
keep = append(keep, gvk) // only expose real versions in the same group
}
keep = append(keep, gvk)
}
v.Extensions["x-kubernetes-group-version-kind"] = keep
}