code: func initParams(att *design.AttributeDefinition) ([]*paramData, []*paramData) {
  	if att == nil {
  		return nil, nil
  	}
  	obj := att.Type.ToObject()
  	var reqParamData []*paramData
  	var optParamData []*paramData
  	for n, q := range obj {
  		varName := codegen.Goify(n, false)
  		param := &paramData{
  			Name:      n,
  			VarName:   varName,
  			Attribute: q,
  		}
  		if q.Type.IsPrimitive() {
  			param.MustToString = q.Type.Kind() != design.StringKind
  			param.ValueName = toValueTypeName(varName, n, att)
  			if att.IsRequired(n) {
  				reqParamData = append(reqParamData, param)
  			} else {
  				param.CheckNil = true
  				optParamData = append(optParamData, param)
  			}
  		} else {
  			if q.Type.IsArray() {
  				param.IsArray = true
  				param.ElemAttribute = q.Type.ToArray().ElemType
  			}
  			param.MustToString = true
  			param.ValueName = varName
  			param.CheckNil = true
  			if att.IsRequired(n) {
  				reqParamData = append(reqParamData, param)
  			} else {
  				optParamData = append(optParamData, param)
  			}
  		}
  	}
  
  	return reqParamData, optParamData
  }
docs: // initParams returns required and optional paramData extracted from given attribute definition.