package metadata

import (
	"fmt"

	"github.com/pingcap-inc/nexuscrm-contract/pkg/catalogassignmentidentityv1"
)

// validateCatalogObjectAPIName applies the portable Catalog object-key v1
// grammar without normalizing or rewriting the authored API name.
func validateCatalogObjectAPIName(value string) error {
	if _, err := catalogassignmentidentityv1.NormalizeObjectAPIName(value); err != nil {
		return fmt.Errorf("Catalog object-key v1: %w", err)
	}
	return nil
}
