code: func (d *Domain) createSubType(newType *Type, protoProp *ProtoProperty) {
  	// create the property
  	newProp := NewTypeProperties(protoProp)
  	// create the new sub type
  	subType := NewSubType(newProp, protoProp)
  
  	// recursive to add props to this type
  	recursiveProps := protoProp.Properties
  	// array type requires the protoType properties.
  	if subType.IsArray() {
  		recursiveProps = subType.protoType.Properties
  	}
  	d.handleType(subType, recursiveProps)
  	d.SubTypes = append(d.SubTypes, subType)
  	// update ref from property to new sub type
  	refName := d.Domain + "Sub" + strings.Title(protoProp.Name)
  	newProp.GoType = refName
  	newProp.IsRef = true
  	newType.Properties = append(newType.Properties, newProp)
  }
docs: // Creates a new SubType *Type object. This is for nested structs that are better
  // defined outside of the original Type. It will call handleType to iterate over
  // the nested properties to create it in much of the same way as a normal type
  // except we prefix it with the Sub keyword.