Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRD convert error: no openapi schema found #31

Closed
amyXia1994 opened this issue Jan 11, 2023 · 1 comment · Fixed by #63
Closed

CRD convert error: no openapi schema found #31

amyXia1994 opened this issue Jan 11, 2023 · 1 comment · Fixed by #63
Assignees

Comments

@amyXia1994
Copy link
Contributor

amyXia1994 commented Jan 11, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. unzip the following file and put it in /oam.yaml

oam.yaml.zip

  1. run kcl-openapi generate model --crd --skip-validation -f Desktop/oam.yaml

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

KCL files generated

3. What did you see instead (Required)

error:

could not generate swagger spec: Desktop/oam.yaml, err: no openapi schema found in the crd file. Please check following fields: spec.Validation.OpenAPIV3Schema, spec.Versions.0.Schema

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

@amyXia1994 amyXia1994 self-assigned this Jan 11, 2023
@amyXia1994 amyXia1994 changed the title CRD convert error: CRD convert error: no openapi schema found Jun 26, 2023
@prahaladramji
Copy link

This bug also extends to CRD from spec V1. It also seems to be that this condition is triggered for all CRD model generation.

eg. crd for external-secrets operator

kcl-openapi generate model --crd \
  -f <(curl -sS "https://raw.githubusercontent.com/external-secrets/external-secrets/main/config/crds/bases/external-secrets.io_externalsecrets.yaml") \
  --skip-validation

could not generate swagger spec: /dev/fd/11, err: no openapi schema found in the crd file. Please check following fields: spec.Validation.OpenAPIV3Schema, spec.Versions.0.Schema

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants