mirror of
https://github.com/rancher/norman.git
synced 2025-09-17 07:40:10 +00:00
Don't generate the ID field
This commit is contained in:
@@ -101,6 +101,9 @@ func getTypeString(nullable bool, typeName string, schema *types.Schema, schemas
|
||||
func getTypeMap(schema *types.Schema, schemas *types.Schemas) map[string]fieldInfo {
|
||||
result := map[string]fieldInfo{}
|
||||
for name, field := range schema.ResourceFields {
|
||||
if strings.EqualFold(name, "id") {
|
||||
continue
|
||||
}
|
||||
result[field.CodeName] = fieldInfo{
|
||||
Name: name,
|
||||
Type: getGoType(field, schema, schemas),
|
||||
|
@@ -1,5 +1,9 @@
|
||||
package types
|
||||
|
||||
const (
|
||||
ResourceFieldID = "id"
|
||||
)
|
||||
|
||||
type Collection struct {
|
||||
Type string `json:"type,omitempty"`
|
||||
Links map[string]string `json:"links"`
|
||||
|
Reference in New Issue
Block a user