mirror of
https://github.com/rancher/norman.git
synced 2025-09-18 16:35:19 +00:00
precreate maps in schema
This commit is contained in:
@@ -74,11 +74,13 @@ func (s *Schemas) Import(version *APIVersion, obj interface{}, externalOverrides
|
||||
|
||||
func (s *Schemas) newSchemaFromType(version *APIVersion, t reflect.Type, typeName string) (*Schema, error) {
|
||||
schema := &Schema{
|
||||
ID: typeName,
|
||||
Version: *version,
|
||||
CodeName: t.Name(),
|
||||
PkgName: t.PkgPath(),
|
||||
ResourceFields: map[string]Field{},
|
||||
ID: typeName,
|
||||
Version: *version,
|
||||
CodeName: t.Name(),
|
||||
PkgName: t.PkgPath(),
|
||||
ResourceFields: map[string]Field{},
|
||||
ResourceActions: map[string]Action{},
|
||||
CollectionActions: map[string]Action{},
|
||||
}
|
||||
|
||||
if err := s.readFields(schema, t); err != nil {
|
||||
|
Reference in New Issue
Block a user