1
0
mirror of https://github.com/rancher/types.git synced 2025-09-16 14:59:16 +00:00

Add description to things

This commit is contained in:
Darren Shepherd
2018-01-03 11:35:18 -07:00
parent 29c5429f11
commit a97913235a
7 changed files with 59 additions and 30 deletions

View File

@@ -55,6 +55,7 @@ func NodeTypes(version *types.APIVersion, schemas *types.Schemas) *types.Schemas
"unschedulable": "ru",
}}).
AddMapperForType(version, v1.Node{},
&m.AnnotationField{Field: "description"},
&m.Embed{Field: "status"},
).
MustImport(version, v1.NodeStatus{}, struct {
@@ -62,7 +63,9 @@ func NodeTypes(version *types.APIVersion, schemas *types.Schemas) *types.Schemas
Hostname string
Info NodeInfo
}{}).
MustImport(version, v1.Node{})
MustImport(version, v1.Node{}, struct {
Description string `json:"description"`
}{})
}
func volumeTypes(schemas *types.Schemas) *types.Schemas {