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

Conditional checks on imported resources #1420

Closed
dennybaa opened this issue Jun 19, 2024 · 1 comment · Fixed by kcl-lang/kcl-openapi#91
Closed

Conditional checks on imported resources #1420

dennybaa opened this issue Jun 19, 2024 · 1 comment · Fixed by kcl-lang/kcl-openapi#91
Labels
bug Something isn't working tool Issues or PRs related to kcl tools inlucding format, lint, validation, document tools, etc.

Comments

@dennybaa
Copy link

Hello, there. There's a bug when importing CRDS with conditional values.

Should be actually as bellow or similar, but at the moment there's no condition to check that value is defined..

schema NetworkingIstioIoV1VirtualServiceSpecHTTPItems0:
    mirrorPercent?: int
    mirror_percent?: int
    check:
        mirrorPercent <= 4.294967295e+09 if mirrorPercent is not Undefined
        mirrorPercent >= 0 if mirrorPercent is not Undefined
        mirror_percent <= 4.294967295e+09 if mirror_percent is not Undefined
        mirror_percent >= 0 if mirror_percent is not Undefined

0.9.1beta1

@Peefy Peefy added bug Something isn't working tool Issues or PRs related to kcl tools inlucding format, lint, validation, document tools, etc. labels Jun 20, 2024
@Peefy Peefy added this to the v0.9.0 Release milestone Jun 20, 2024
@Peefy
Copy link
Contributor

Peefy commented Jun 20, 2024

fixed in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tool Issues or PRs related to kcl tools inlucding format, lint, validation, document tools, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants