mirror of
https://github.com/rancher/steve.git
synced 2025-09-16 07:18:28 +00:00
Adding APIGroups back to the schema
Prior schema calculations started with openapiv2 models which included a model for APIGroups. However, new schema calculations use ServerGroupsAndResources first, which omitted these values. This re-adds this type using a static schema.
This commit is contained in:
@@ -7,10 +7,22 @@ import (
|
||||
|
||||
"github.com/rancher/apiserver/pkg/store/empty"
|
||||
"github.com/rancher/apiserver/pkg/types"
|
||||
wschemas "github.com/rancher/wrangler/v3/pkg/schemas"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/client-go/discovery"
|
||||
)
|
||||
|
||||
var BaseSchema = types.APISchema{
|
||||
Schema: &wschemas.Schema{
|
||||
ID: "apigroup",
|
||||
Attributes: map[string]interface{}{
|
||||
"group": "",
|
||||
"kind": "APIGroup",
|
||||
"version": "v1",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
func Template(discovery discovery.DiscoveryInterface) schema.Template {
|
||||
return schema.Template{
|
||||
ID: "apigroup",
|
||||
|
Reference in New Issue
Block a user