Skip to content

KCL import fails when both versions of a resource have the same openAPIV3Schema #148

@arthur-leclerc

Description

@arthur-leclerc

Bug Report

I'm attempting to generate KCL from Crossplane CRDs. Version v1.8.0 of Crossplane transitions EnvironmentConfig resource from v1alpha1 to v1beta1. The schema now contains two versions in spec.versions, but only v1alpha1 is generated by the KCL import command.

From what I saw during my investigation, the problem is that openAPIV3Schema is the same for both versions, and if I change something inside one version, both schemas are available after KCL import.

1. Minimal reproduce step (Required)

kcl import -m crd -o . object.yaml ( https://github.com/crossplane/crossplane/blob/v1.18.2/cluster/crds/apiextensions.crossplane.io_environmentconfigs.yaml )

2. What did you expect to see? (Required)

Both schemas generated and usable.

3. What did you see instead (Required)

Only version v1alpha1 is generated, not v1beta1.

4. What is your KCL components version? (Required)

kcl version v0.11.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions