private void GenerateObject(JToken token, JsonSchema4 schema, JsonSchema4 rootSchema) { schema.Type = JsonObjectType.Object; foreach (var property in ((JObject)token).Properties()) { var propertySchema = new JsonProperty(); var propertyName = property.Value.Type == JTokenType.Array ? ConversionUtilities.Singularize(property.Name) : property.Name; var typeNameHint = ConversionUtilities.ConvertToUpperCamelCase(propertyName, true); Generate(property.Value, propertySchema, rootSchema, typeNameHint); schema.Properties[property.Name] = propertySchema; } }