func (linter ApiLinter) SupportsMimeType(mimeType string) bool {
	return core.IsProto(mimeType)
}
SupportsMimeType returns whether a mime type is supported by API Linter. API
Linter lints based on AIPs (https://google.aip.dev/) which are defined on protos.
package conformance
import (
	"encoding/json"
	"os/exec"
	"path/filepath"
	"github.com/apex/log"
	"github.com/apigee/registry/cmd/registry/core"
	"github.com/apigee/registry/rpc"
)
type ApiLinter struct {
	Rules map[string][]string
}
type apiLinterRunner interface {
	Run(specPath string) ([]*rpc.LintProblem, error)
}
type concreteApiLinterRunner struct{}
func NewApiLinter() ApiLinter {
	return ApiLinter{
		Rules: make(map[string][]string),
	}
}
func unpackGoogleApisProtos(rootDir string) error {
	curlCmd := exec.Command("curl", "-L", "https://github.com/googleapis/googleapis/archive/refs/heads/master.zip", "-O")
	curlCmd.Dir = rootDir
	err := curlCmd.Run()
	if err != nil {
		return err
	}
	unzipCmd := exec.Command("unzip", "-q", "master.zip")
	unzipCmd.Dir = rootDir
	err = unzipCmd.Run()
	if err != nil {
		return err
	}
	mvCmd := exec.Command("mv", "googleapis-master/google", "google")
	mvCmd.Dir = rootDir
	return mvCmd.Run()
}
func unpackApiCommonProtos(rootDir string) error {
	cmd := exec.Command("git", "clone", "https://github.com/googleapis/api-common-protos")
	cmd.Dir = rootDir
	return cmd.Run()
}
func (linter ApiLinter) AddRule(mimeType string, rule string) error {
	if !linter.SupportsMimeType(mimeType) {
		return createUnsupportedMimeTypeError(mimeType)
	}
	linter.Rules[mimeType] = append(linter.Rules[mimeType], rule)
	return nil
}
func (linter ApiLinter) GetName() string {
	return "api-linter"
}