kubectl/pkg/explain/v2
Antoine Pelisse 2c4bec21e5 openapi: Make file client more easy to re-use
A few notes about the change:
1. I need to initialize the fileclient once, in an init function, so I
don't have access to `testing.T` yet.
2. I want to be able to configure the openapi files that I use
3. We already have a "cache" client that wraps another client, we don't
need to re-implement caching here, one can just do:
`cache.NewClient(openapitest.NewFileClient("some/path"))` to do a cached
client. Or initialize it in an init/global var.

Since there is still some value to use the embedded file, make an
alternative constructor while using fs.FS interface to be able to
manipulate both virtual and disk-based filesystems.

Kubernetes-commit: 29503fd8d45bc2c9438e92936bf4111162529b40
2023-03-28 13:40:28 -07:00
..
templates throw missing field in std err 2023-03-14 12:34:04 -07: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 throw missing field in std err 2023-03-14 12:34:04 -07:00
funcs_test.go staging: fix "go vet" issues 2023-02-28 21:22:40 +01:00
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