func LoadConfiguration(configurationFile string) (*Configuration, error) {
	data, err := os.ReadFile(configurationFile)
	if err != nil {
		return nil, err
	}
	result := &Configuration{}
	err = yaml.Unmarshal(data, result)
	if err != nil {
		return nil, errors.Wrapf(err, "configuration file loaded from %q is not valid YAML", configurationFile)
	}
	err = result.initialize(configurationFile)
	if err != nil {
		return nil, errors.Wrapf(err, "configuration file loaded from %q is invalid", configurationFile)
	}
	return result, nil
}
LoadConfiguration loads a `Configuration` from the specified file
package config
import (
	"net/url"
	"os"
	"path"
	"path/filepath"
	"strings"
	"github.com/pkg/errors"
	"golang.org/x/mod/modfile"
	"gopkg.in/yaml.v3"
	kerrors "k8s.io/apimachinery/pkg/util/errors"
	"github.com/Azure/k8s-infra/hack/generator/pkg/astmodel"
)
type GenerationPipeline string
const (
	GenerationPipelineAzure      = GenerationPipeline("azure")
	GenerationPipelineCrossplane = GenerationPipeline("crossplane")
)
type Configuration struct {
	SchemaURL string `yaml:"schemaUrl"`
	SchemaURLRewrite *RewriteRule `yaml:"schemaUrlRewrite"`
	Status StatusConfiguration `yaml:"status"`
	Pipeline GenerationPipeline `yaml:"pipeline"`
	DestinationGoModuleFile string `yaml:"destinationGoModuleFile"`
	TypesOutputPath string `yaml:"typesOutputPath"`
	TypeRegistrationOutputFile string `yaml:"typeRegistrationOutputFile"`
	AnyTypePackages []string `yaml:"anyTypePackages"`
	ExportFilters []*ExportFilter `yaml:"exportFilters"`
	TypeFilters []*TypeFilter `yaml:"typeFilters"`
	Transformers []*TypeTransformer `yaml:"typeTransformers"`
	GoModulePath string              
	typeTransformers     []*TypeTransformer
	propertyTransformers []*TypeTransformer
}
type RewriteRule struct {
	From string `yaml:"from"`
	To   string `yaml:"to"`
}
func (config *Configuration) LocalPathPrefix() string {
	return path.Join(config.GoModulePath, config.TypesOutputPath)
}
func (config *Configuration) FullTypesOutputPath() string {
	return filepath.Join(
		filepath.Dir(config.DestinationGoModuleFile),
		config.TypesOutputPath)
}
func (config *Configuration) FullTypesRegistrationOutputFilePath() string {
	if config.TypeRegistrationOutputFile == "" {
		return ""
	}
	return filepath.Join(
		filepath.Dir(config.DestinationGoModuleFile),
		config.TypeRegistrationOutputFile)
}
func NewConfiguration() *Configuration {
	return &Configuration{}
}