kcl-lang/kcl-openapi

Crossplane Composition CRD generates errors

markphillips100 opened this issue · 3 comments

Bug Report

1. Minimal reproduce step (Required)

  1. Install latest kcl-openapi
  2. Download crossplane composition crd from here, or clone repo whichever is preferred to obtain this file.
  3. Type kcl-openapi generate model --crd -f <location of yaml from step 1> -t . --skip-validation
  4. Observe error in output related to a map value MatchCondition.

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

No error and a generated schema.

3. What did you see instead (Required)

2024/03/12 18:51:47 preprocessing spec with option:  minimal flattening
2024/03/12 18:51:47 building a plan for generation
2024/03/12 18:51:47 generation target .
2024/03/12 18:51:47 planning definitions
2024/03/12 18:51:47 unexpected ordered map value: MatchCondition

I also ran the schema import using kcl import and that outputs a file albeit with an error on line 1171 of the generated file. See this issue for details.

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

KCL: 0.8.0-windows-amd64
KCL vscode extension: v0.1.5
OS: Windows11

Thank you for the feedback. I will fix it soon, or PRs welcome.

Sadly I'm not a Go dev so cannot help with a PR unfortunately.

Sadly I'm not a Go dev so cannot help with a PR unfortunately.

OK. Thank you! Let me fix it later.