-
Notifications
You must be signed in to change notification settings - Fork 155
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
- create following file test.yaml
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: tests.example.com
spec:
group: example.com
names:
kind: Test
listKind: TestList
plural: tests
singular: test
scope: Namespaced
versions:
- deprecated: true
name: v1
schema:
openAPIV3Schema:
description: "test"
properties:
apiVersion:
description: "test"
type: string
kind:
description: "test"
type: string
metadata:
type: object
spec:
description: "test"
properties:
test:
description: test
items:
description: test
items:
maxLength: 512
minLength: 1
type: string
maxItems: 100
minItems: 1
type: array
maxItems: 100
minItems: 1
type: array
x-kubernetes-list-type: atomic
type: object
type: object
served: false
storage: false- Import this file wit crd mode to kcl
kcl import --mode crd test.yaml -o test- invastigate generated file
test/models/v1/example_com_v1_test_swagger.kthe last check in schema
2. What did you expect to see? (Required)
This line should not contain an error and should look similar to this code:
all n in test {len(test) <= 512 and len(test) >= 1 } if test not in [None, Undefined]
3. What did you see instead (Required)
all n in test {len(test) <= 512 if test not in [None, Undefined]len(test) >= 1 if test not in [None, Undefined] } if test
4. What is your KCL components version? (Required)
> kcl --version
kcl version 0.12.1
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working