mirror of
https://github.com/rancher/norman.git
synced 2025-08-31 06:35:09 +00:00
Merge pull request #398 from cmurphy/nullablestring
Add 'nullablestring' field type
This commit is contained in:
@@ -81,6 +81,8 @@ func getTypeString(nullable bool, typeName string, schema *types.Schema, schemas
|
||||
return "string"
|
||||
case "hostname":
|
||||
return "string"
|
||||
case "nullablestring":
|
||||
return "*string"
|
||||
default:
|
||||
if schema != nil && schemas != nil {
|
||||
otherSchema := schemas.Schema(&schema.Version, typeName)
|
||||
|
@@ -382,6 +382,8 @@ func ConvertSimple(fieldType string, value interface{}, op Operation) (interface
|
||||
return convert.ToString(value), nil
|
||||
case "reference":
|
||||
return convert.ToString(value), nil
|
||||
case "nullablestring":
|
||||
return convert.ToString(value), nil
|
||||
}
|
||||
|
||||
return nil, ErrComplexType
|
||||
|
Reference in New Issue
Block a user