ahmetb / gen-crd-api-reference-docs

API Reference Docs generator for Kubernetes CRDs (used by Knative, Kubeflow and others)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

could not get apiVersion for package k8s.io/apiextensions-apiserver/...

guettli opened this issue · comments

I get this error while building my CRD docs.

F0619 10:14:33.489771 188693 main.go:140] could not get apiVersion for package k8s.io/apiextensions-apiserver/pkg/apis/apiextensions: cannot infer kubernetes apiVersion of go package k8s.io/apiextensions-apiserver/pkg/apis/apiextensions (basename "apiextensions" doesn't match expected pattern ^v\d+((alpha|beta)\d+)?$ that's used to determine apiVersion)

Does someone has an idea how to fix or work-around it?

I modified the source code. I commented out the creation of the error, and added a continue.

Now I could build my docs, but it would be nice make this configurable.

	for _, pkg := range pkgs {
		apiGroup, apiVersion, err := apiVersionForPackage(pkg)
		if err != nil {
			//return nil, errors.Wrapf(err, "could not get apiVersion for package %s", pkg.Path)
			continue
		}