I'm not sure if there is a specific reason for how it works at current, but what I would like to do is externally reference say the kubernetes API spec, but also provide the go type instead of generating it.
At current I'm referencing say v1.Taint in an object, but I also want to reference it's openapi spec so that its rendered in the swagger/openapi docs:
KubeSpec:
type: object
properties:
taints:
$ref: "https://raw.githubusercontent.com/kubernetes/kubernetes/v1.23.9/api/openapi-spec/v3/api__v1_openapi.json#/components/schemas/io.k8s.api.core.v1.Taint"
x-go-type: v1.Taint
x-go-type-import:
name: v1
path: k8s.io/api/core/v1
At current, when $ref is present, it seems to try to render the type via the import mapping, but I'd much prefer to provide the type.
Is this possible? If not, would a PR be welcome and any ideas where to start?
Thanks so much!
I'm not sure if there is a specific reason for how it works at current, but what I would like to do is externally reference say the kubernetes API spec, but also provide the go type instead of generating it.
At current I'm referencing say
v1.Taintin an object, but I also want to reference it's openapi spec so that its rendered in the swagger/openapi docs:At current, when
$refis present, it seems to try to render the type via the import mapping, but I'd much prefer to provide the type.Is this possible? If not, would a PR be welcome and any ideas where to start?
Thanks so much!