docs: func CodeGenModel(modelFile io.Reader, outFile io.Writer, optFns ...func(*CodeGenOptions)) error {
  	var opts CodeGenOptions
  	opts.Set(optFns...)
  
  	resolver, err := DecodeModel(modelFile, func(d *DecodeModelOptions) {
  		*d = opts.DecodeModelOptions
  	})
  	if err != nil {
  		return err
  	}
  
  	v := struct {
  		Resolver
  		CodeGenOptions
  	}{
  		Resolver:       resolver,
  		CodeGenOptions: opts,
  	}
  
  	tmpl := template.Must(template.New("tmpl").Funcs(funcMap).Parse(v3Tmpl))
  	if err := tmpl.ExecuteTemplate(outFile, "defaults", v); err != nil {
  		return fmt.Errorf("failed to execute template, %v", err)
  	}
  
  	return nil
  }