-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
4.20
-
None
-
None
-
False
-
-
None
-
Moderate
-
None
-
x86_64
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Description of problem:
When accessing the OpenAPI v3 spec path for OCP Virtualization subresources (e.g., via /openapi/v3/apis/subresources.kubevirt.io/v1 (aggregated api server - only open api v2 spec is provided, the v2 -> v3 conversion is done probably by kube-aggregator)), the resulting manifest contains invalid references. Specifically, the paths section uses $ref to point to parameters in components.parameters., but the components.parameters section is entirely missing from the document. The /openapi/v2 output remains valid, suggesting an issue with how the Kubernetes API server aggregates or converts the v2 definitions into v3. I created example aggregated api - https://github.com/ksimon1/aggregated-api, just to reproduce the behaviour and it hits the same issue.
Version-Release number of selected component (if applicable):
4.20
How reproducible:
100%
Steps to Reproduce:
1.Deploy Kubevirt or OCP Virtualization or the reproducer https://github.com/ksimon1/aggregated-api - I can help with that
2.Access <cluster-api>/openapi/v3/apis/subresources.kubevirt.io/ e.g. with curl -i -H "Accept: application/json, application/yaml" -H "Content-type: application/json" -v --request GET -k --header "Authorization: Bearer <token>" "https://<api-url>/openapi/v3/apis/subresources.kubevirt.io/v1"
OR
oc get --raw /openapi/v2 > apiv2
oc get --raw /openapi/v3/apis/example.aggregated.io/v1 > apiv3
3.Generated manifest does not contain parameters component. So the parameters in paths are pointing to nowhere
Actual results:
Returned V3 open api manifest does not contains parameters component which makes parameters $ref unresolvable
Expected results:
Returned V3 open api manifest does contains parameters component, which makes the $ref resolvable
Additional info:
- blocks
-
CNV-76431 [rapidast] openapi spec v3 is incorrect for subresources_kubevirt_io_v1and subresources_kubevirt_io_v1alpha3
-
- New
-
- links to