This commit is contained in:
2020-02-11 19:25:12 +00:00
parent cb30a41381
commit ef063d5864
9 changed files with 118 additions and 122 deletions

View File

@@ -73,7 +73,7 @@ namespace AyaNova.DataList
//Has a Enumtype?
if (!string.IsNullOrEmpty(o.EnumType))
sb.Append($",\"et\":\"{TrimTypeName(o.EnumType)}\"");
sb.Append($",\"et\":\"{AyaNova.Util.StringUtil.TrimTypeName(o.EnumType)}\"");
sb.Append("}");
@@ -85,16 +85,6 @@ namespace AyaNova.DataList
}
//used to trim an enum type down to only it's most relevant (rightmost) portion
private string TrimTypeName(string str)
{
if (str.Contains('.'))
{
return str.Substring(str.LastIndexOf('.') + 1);
}
return str;
}
//make sure the template parses and all the fields specified are really existant
//this is more for dev errors or api users becuase the client shouldn't generate bad templates
public bool ValidateTemplate(string template)