isStringMetaType returns true if the attribute has a struct:field:type meta whose underlying DSL type is string, indicating the custom type should implement encoding.TextUnmarshaler for HTTP parameter conversion.
(c *expr.AttributeExpr)
| 3009 | // whose underlying DSL type is string, indicating the custom type should |
| 3010 | // implement encoding.TextUnmarshaler for HTTP parameter conversion. |
| 3011 | func isStringMetaType(c *expr.AttributeExpr) bool { |
| 3012 | typeName, _ := codegen.GetMetaType(c) |
| 3013 | if typeName == "" { |
| 3014 | return false |
| 3015 | } |
| 3016 | return c.Type.Kind() == expr.StringKind |
| 3017 | } |
| 3018 | |
| 3019 | // addMarshalTags adds JSON, XML and Form tags to all inline object attributes recursively. |
| 3020 | func addMarshalTags(att *expr.AttributeExpr, seen map[string]struct{}) { |
no test coverage detected