Conversation
Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #996 +/- ##
==========================================
- Coverage 62.19% 62.02% -0.17%
==========================================
Files 55 55
Lines 8779 8804 +25
==========================================
+ Hits 5460 5461 +1
- Misses 2951 2969 +18
- Partials 368 374 +6
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
danehans
left a comment
There was a problem hiding this comment.
@zirain I tested this PR and get the following error when calling the make target:
$ make docs.apireference
===========> Running docs.apireference ...
tools/hack/gen-api-doc.sh
I0208 09:50:54.886138 28238 main.go:129] parsing go packages in directory github.com/envoyproxy/gateway/api/v1alpha1/
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x13fbc94]
goroutine 1 [running]:
k8s.io/gengo/parser.(*Builder).AddDirRecursive(0xc0001655e0, {0x7ff7bfeff08a, 0x2b})
/Users/daneyonhansen/go/pkg/mod/k8s.io/gengo@v0.0.0-20201203183100-97869a43a9d9/parser/parse.go:234 +0x114
main.parseAPIPackages({0x7ff7bfeff08a?, 0x2b?})
/Users/daneyonhansen/go/pkg/mod/github.com/ahmetb/gen-crd-api-reference-docs@v0.3.0/main.go:203 +0x49
main.main()
/Users/daneyonhansen/go/pkg/mod/github.com/ahmetb/gen-crd-api-reference-docs@v0.3.0/main.go:130 +0x208
make[1]: *** [docs.apireference] Error 2
make: *** [_run] Error 2
When I update -api-dir in the script to "./api/v1alpha1/" and "./api/config/v1alpha1", I get the following error:
$ make docs.apireference
===========> Running docs.apireference ...
tools/hack/gen-api-doc.sh
I0208 09:51:51.164235 28809 main.go:129] parsing go packages in directory ./api/v1alpha1/
I0208 09:51:51.175542 28809 main.go:231] using package=github.com/envoyproxy/gateway/api/v1alpha1
F0208 09:51:51.197337 28809 main.go:503] type invalid type has kind=Unsupported which is unhandled
make[1]: *** [docs.apireference] Error 255
make: *** [_run] Error 2
| }, | ||
| { | ||
| "typeMatchPrefix": "^k8s\\.io/(api|apimachinery/pkg/apis)/", | ||
| "docsURLTemplate": "https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#{{lower .TypeIdentifier}}-{{arrIndex .PackageSegments -1}}-{{arrIndex .PackageSegments -2}}" |
| $(call log, "Updated: docs/$(TAG)/user/$$DOC") ; \ | ||
| done | ||
|
|
||
| .PHONY: docs.apireference |
There was a problem hiding this comment.
Can you rename to doc-api and add this to the docs target? For example:
docs: docs.clean $(tools/sphinx-build) docs-api ## Generate Envoy Gateway Docs Sources
| .PHONY: docs.apireference | ||
| docs.apireference: $(tools/gen-crd-api-reference-docs) | ||
| @$(LOG_TARGET) | ||
| tools/hack/gen-api-doc.sh No newline at end of file |
| </table> | ||
| {{ end }} | ||
|
|
||
| {{ end }} No newline at end of file |
| {{ with .gitCommit }} on git commit <code>{{ . }}</code>{{end}}. | ||
| </em></p> | ||
|
|
||
| {{ end }} No newline at end of file |
|
|
||
| package ignore | ||
|
|
||
| import "github.com/ahmetb/gen-crd-api-reference-docs" No newline at end of file |
|
To fix lint errors: |
|
#980 is better, close this. |
Signed-off-by: hejianpeng hejianpeng2@huawei.com
Fixes #965
cc @arkodg @danehans