1
0
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:
Darren Shepherd
2021-05-01 19:45:49 -07:00
committed by GitHub
2 changed files with 4 additions and 0 deletions

View File

@@ -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)

View File

@@ -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