Use OpenAPI docs to generate reference docs #3523
Labels
kind/infrastructure
Docs infrastructure related
kind/needs-automation
Tag for issues that involve automation of a task
lifecycle/frozen
Indicates that an issue or PR should not be auto-closed due to staleness.
priority/medium
triage/needs-eng-input
Engineering input is requested
Milestone
Expected Behavior
https://knative.dev/docs/reference/api/ are based on the exported OpenAPI definitions:
These should be able to be filtered by API group, so only non-internal APIs are documented. Kubernetes has a tool for this here: https://github.com/kubernetes-sigs/reference-docs Documentation on its use is here: https://kubernetes.io/docs/contribute/generate-ref-docs/kubernetes-api/
Actual Behavior
We use the script here: https://github.com/knative/docs/blob/main/hack/gen-api-reference-docs.sh, which uses the custom tool here: https://github.com/ahmetb/gen-crd-api-reference-docs
This builds output based on the Go structures, ignoring any OpenAPI validation or fields that we don't support. Also, the resulting output bleeds through Go structure embedding, making it harder for non-Go developers to understand the shape of the API.
Steps to Reproduce the Problem
Additional Info
This is not high-priority at the moment, but since the OpenAPI docs are clearer about which fields are and are not supported, this would fix #2085
The text was updated successfully, but these errors were encountered: