mirror of
https://github.com/rancher/steve.git
synced 2025-09-01 07:27:46 +00:00
Drop non-preferred version and version in the schema id
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package attributes
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/rancher/steve/pkg/schemaserver/types"
|
||||
"github.com/rancher/wrangler/pkg/data/convert"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -75,6 +77,14 @@ func SetGVK(s *types.APISchema, gvk schema.GroupVersionKind) {
|
||||
SetKind(s, gvk.Kind)
|
||||
}
|
||||
|
||||
func Table(s *types.APISchema) bool {
|
||||
return str(s, "table") != "false"
|
||||
}
|
||||
|
||||
func SetTable(s *types.APISchema, value bool) {
|
||||
setVal(s, "table", fmt.Sprint(value))
|
||||
}
|
||||
|
||||
func GVR(s *types.APISchema) schema.GroupVersionResource {
|
||||
return schema.GroupVersionResource{
|
||||
Group: Group(s),
|
||||
|
Reference in New Issue
Block a user