-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Expected Behavior
https://knative.dev/docs/reference/api/ are based on the exported OpenAPI definitions:
- https://github.com/knative/serving/blob/main/config/core/300-resources/service.yaml (et al)
- https://github.com/knative/eventing/blob/main/config/core/resources/broker.yaml (et al)
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
- Follow directions here: https://knative.dev/help/maintainer/building-api-output/
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