kubectl/pkg/explain/v2
Predrag Knezevic c04eeb90aa kubectl explain: render externalDocs from OpenAPI v3 schemas
CRD authors can set the externalDocs field in their [OpenAPI v3
schemas](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/)
 to reference external documentation for their custom resources. However, kubectl explain
did not surface this information to users.

Render externalDocs metadata in the plaintext output of kubectl
explain. When a schema or field includes an externalDocs section, it
is now displayed as:

```
    EXTERNAL DOCS:
        <description>
        URL: <url>
```

This appears after the DESCRIPTION block for top-level resources and
after the field description for individual fields. The section is
omitted in short mode and when externalDocs is absent.

Kubernetes-commit: 7d855871267a3a9698af2862c79ebb7d4d2ec308
2026-02-11 13:01:38 +01:00
..
templates kubectl explain: render externalDocs from OpenAPI v3 schemas 2026-02-11 13:01:38 +01:00
explain.go throw missing field in std err 2023-03-14 12:34:04 -07:00
explain_test.go openapi: Make file client more easy to re-use 2023-03-28 13:40:28 -07:00
funcs.go Avoid no-change lambdas 2025-09-19 16:56:00 +02:00
funcs_test.go Revert PR #126533 and add a test case for the case where there is yaml 2024-11-12 14:23:03 +03:30
generator.go refactor generator 2022-11-02 20:34:12 -07:00
generator_test.go openapi: Make file client more easy to re-use 2023-03-28 13:40:28 -07:00
template.go add template loading to generator 2022-11-02 20:33:11 -07:00
template_test.go add template loading to generator 2022-11-02 20:33:11 -07:00