func markStorageVersion() PipelineStage {
	return MakePipelineStage(
		"markStorageVersion",
		"Marking the latest version of each resource as the storage version",
		func(ctx context.Context, types astmodel.Types) (astmodel.Types, error) {
			updatedDefs, err := MarkLatestResourceVersionsForStorage(types)
			if err != nil {
				return nil, errors.Wrapf(err, "unable to mark latest resource version as storage version")
			}
			return updatedDefs, nil
		})
}
markStorageVersion creates a PipelineStage to mark a particular version as a storage version
package codegen
import (
	"context"
	"sort"
	"github.com/pkg/errors"
	"github.com/Azure/k8s-infra/hack/generator/pkg/astmodel"
)