mirror of
https://github.com/rancher/norman.git
synced 2025-09-01 07:08:59 +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"
|
return "string"
|
||||||
case "hostname":
|
case "hostname":
|
||||||
return "string"
|
return "string"
|
||||||
|
case "nullablestring":
|
||||||
|
return "*string"
|
||||||
default:
|
default:
|
||||||
if schema != nil && schemas != nil {
|
if schema != nil && schemas != nil {
|
||||||
otherSchema := schemas.Schema(&schema.Version, typeName)
|
otherSchema := schemas.Schema(&schema.Version, typeName)
|
||||||
|
@@ -382,6 +382,8 @@ func ConvertSimple(fieldType string, value interface{}, op Operation) (interface
|
|||||||
return convert.ToString(value), nil
|
return convert.ToString(value), nil
|
||||||
case "reference":
|
case "reference":
|
||||||
return convert.ToString(value), nil
|
return convert.ToString(value), nil
|
||||||
|
case "nullablestring":
|
||||||
|
return convert.ToString(value), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil, ErrComplexType
|
return nil, ErrComplexType
|
||||||
|
Reference in New Issue
Block a user