code: func New(ss raml.SecurityScheme, name, packageName string) Security {
  	sd := Security{
  		SecurityScheme: &ss,
  	}
  	sd.Name = SecuritySchemeName(name)
  	sd.PackageName = packageName
  
  	// assign header, if any
  	for k, v := range sd.DescribedBy.Headers {
  		header := v
  		header.Name = string(k)
  		sd.Headers = append(sd.Headers, &header)
  	}
  	sort.SliceStable(sd.Headers, func(i, j int) bool { return sd.Headers[i].Name < sd.Headers[j].Name })
  
  	// assign query params if any
  	for k, v := range sd.DescribedBy.QueryParameters {
  		queryParam := v
  		queryParam.Name = string(k)
  		sd.QueryParams = append(sd.QueryParams, &queryParam)
  	}
  	sort.SliceStable(sd.QueryParams, func(i, j int) bool { return sd.QueryParams[i].Name < sd.QueryParams[j].Name })
  
  	return sd
  }
docs: // New creates a security struct