Example #1
0
 /// <summary>Generates the type name.</summary>
 /// <param name="schema">The property.</param>
 /// <param name="typeNameHint">The type name hint (the property name or definition key).</param>
 /// <returns>The new name.</returns>
 public virtual string Generate(JsonSchema4 schema, string typeNameHint)
 {
     return(ConversionUtilities.ConvertToUpperCamelCase(typeNameHint?.Split('.').Last() ?? "Anonymous", true));
 }
Example #2
0
        /// <summary>Generates the type name for the given schema.</summary>
        /// <param name="schema">The schema.</param>
        /// <param name="typeNameHint">The type name hint.</param>
        /// <returns>The type name.</returns>
        protected virtual string Generate(JsonSchema4 schema, string typeNameHint)
        {
            var lastSegment = typeNameHint?.Split('.').Last();

            return(ConversionUtilities.ConvertToUpperCamelCase(lastSegment ?? "Anonymous", true));
        }
 /// <summary>Generates the type name.</summary>
 /// <param name="schema">The property.</param>
 /// <param name="typeNameHint">The type name hint (the property name or definition key).</param>
 /// <returns>The new name.</returns>
 public virtual string Generate(JsonSchema4 schema, string typeNameHint)
 {
     return(ConversionUtilities.ConvertToUpperCamelCase(schema.TypeNameRaw?.Split('.').Last(), true));
 }