Skip to content

Commit 7d5d348

Browse files
authored
feat: use raw string for generated schema from oai and k8s crd (#93)
* feat: use raw string for generated schema from oai and k8s crd Signed-off-by: peefy <[email protected]> * chore: remove CLA Signed-off-by: peefy <[email protected]> --------- Signed-off-by: peefy <[email protected]>
1 parent fc450f8 commit 7d5d348

File tree

123 files changed

+907
-565
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+907
-565
lines changed

.github/workflows/cla.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

examples/kube_resource/complex/muti_models/models/core_oam_dev_v1alpha2_containerized_workload.k

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ _regex_match = regex.match
88

99

1010
schema ContainerizedWorkload:
11-
"""
11+
r"""
1212
A ContainerizedWorkload is a workload that runs OCI containers.
1313

1414
Attributes
@@ -38,7 +38,7 @@ schema ContainerizedWorkload:
3838

3939

4040
schema CoreOamDevV1alpha2ContainerizedWorkloadSpec:
41-
"""
41+
r"""
4242
A ContainerizedWorkloadSpec defines the desired state of a ContainerizedWorkload.
4343

4444
Attributes
@@ -60,7 +60,7 @@ schema CoreOamDevV1alpha2ContainerizedWorkloadSpec:
6060

6161

6262
schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0:
63-
"""
63+
r"""
6464
A Container represents an Open Containers Initiative (OCI) container.
6565

6666
Attributes
@@ -114,7 +114,7 @@ schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0:
114114

115115

116116
schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0ConfigItems0:
117-
"""
117+
r"""
118118
A ContainerConfigFile specifies a configuration file that should be written within a container.
119119

120120
Attributes
@@ -132,7 +132,7 @@ schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0ConfigItems0:
132132

133133

134134
schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0EnvItems0:
135-
"""
135+
r"""
136136
A ContainerEnvVar specifies an environment variable that should be set within a container.
137137

138138
Attributes
@@ -154,7 +154,7 @@ schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0EnvItems0:
154154

155155

156156
schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0LivenessProbe:
157-
"""
157+
r"""
158158
A LivenessProbe assesses whether this container is alive. Containers that fail liveness probes will be restarted.
159159

160160
Attributes
@@ -196,7 +196,7 @@ schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0LivenessProbe:
196196

197197

198198
schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0LivenessProbeExec:
199-
"""
199+
r"""
200200
Exec probes a container's health by executing a command.
201201

202202
Attributes
@@ -210,7 +210,7 @@ schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0LivenessProbeE
210210

211211

212212
schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0LivenessProbeHTTPGet:
213-
"""
213+
r"""
214214
HTTPGet probes a container's health by sending an HTTP GET request.
215215

216216
Attributes
@@ -232,7 +232,7 @@ schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0LivenessProbeH
232232

233233

234234
schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0LivenessProbeHTTPGetHTTPHeadersItems0:
235-
"""
235+
r"""
236236
A HTTPHeader to be passed when probing a container.
237237

238238
Attributes
@@ -250,7 +250,7 @@ schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0LivenessProbeH
250250

251251

252252
schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0LivenessProbeTCPSocket:
253-
"""
253+
r"""
254254
TCPSocketProbe probes a container's health by connecting to a TCP socket.
255255

256256
Attributes
@@ -264,7 +264,7 @@ schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0LivenessProbeT
264264

265265

266266
schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0PortsItems0:
267-
"""
267+
r"""
268268
A ContainerPort specifies a port that is exposed by a container.
269269

270270
Attributes
@@ -290,7 +290,7 @@ schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0PortsItems0:
290290

291291

292292
schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0ReadiessProbe:
293-
"""
293+
r"""
294294
A ReadinessProbe assesses whether this container is ready to serve requests. Containers that fail readiness probes will be withdrawn from service.
295295

296296
Attributes
@@ -332,7 +332,7 @@ schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0ReadiessProbe:
332332

333333

334334
schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0ReadiessProbeExec:
335-
"""
335+
r"""
336336
Exec probes a container's health by executing a command.
337337

338338
Attributes
@@ -346,7 +346,7 @@ schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0ReadiessProbeE
346346

347347

348348
schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0ReadiessProbeHTTPGet:
349-
"""
349+
r"""
350350
HTTPGet probes a container's health by sending an HTTP GET request.
351351

352352
Attributes
@@ -368,7 +368,7 @@ schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0ReadiessProbeH
368368

369369

370370
schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0ReadiessProbeHTTPGetHTTPHeadersItems0:
371-
"""
371+
r"""
372372
A HTTPHeader to be passed when probing a container.
373373

374374
Attributes
@@ -386,7 +386,7 @@ schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0ReadiessProbeH
386386

387387

388388
schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0ReadiessProbeTCPSocket:
389-
"""
389+
r"""
390390
TCPSocketProbe probes a container's health by connecting to a TCP socket.
391391

392392
Attributes
@@ -400,7 +400,7 @@ schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0ReadiessProbeT
400400

401401

402402
schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0Resources:
403-
"""
403+
r"""
404404
Resources required by this container
405405

406406
Attributes
@@ -430,7 +430,7 @@ schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0Resources:
430430

431431

432432
schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0ResourcesCPU:
433-
"""
433+
r"""
434434
CPU required by this container.
435435

436436
Attributes
@@ -444,7 +444,7 @@ schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0ResourcesCPU:
444444

445445

446446
schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0ResourcesExtendedItems0:
447-
"""
447+
r"""
448448
ExtendedResource required by a container.
449449

450450
Attributes
@@ -462,7 +462,7 @@ schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0ResourcesExten
462462

463463

464464
schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0ResourcesGpu:
465-
"""
465+
r"""
466466
GPU required by this container.
467467

468468
Attributes
@@ -476,7 +476,7 @@ schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0ResourcesGpu:
476476

477477

478478
schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0ResourcesMemory:
479-
"""
479+
r"""
480480
Memory required by this container.
481481

482482
Attributes
@@ -490,7 +490,7 @@ schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0ResourcesMemor
490490

491491

492492
schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0ResourcesVolumesItems0:
493-
"""
493+
r"""
494494
VolumeResource required by a container.
495495

496496
Attributes
@@ -520,7 +520,7 @@ schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0ResourcesVolum
520520

521521

522522
schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0ResourcesVolumesItems0Disk:
523-
"""
523+
r"""
524524
Disk requirements of this volume.
525525

526526
Attributes
@@ -538,7 +538,7 @@ schema CoreOamDevV1alpha2ContainerizedWorkloadSpecContainersItems0ResourcesVolum
538538

539539

540540
schema CoreOamDevV1alpha2ContainerizedWorkloadStatus:
541-
"""
541+
r"""
542542
A ContainerizedWorkloadStatus represents the observed state of a ContainerizedWorkload.
543543

544544
Attributes
@@ -556,7 +556,7 @@ schema CoreOamDevV1alpha2ContainerizedWorkloadStatus:
556556

557557

558558
schema CoreOamDevV1alpha2ContainerizedWorkloadStatusConditionsItems0:
559-
"""
559+
r"""
560560
A Condition that may apply to a resource.
561561

562562
Attributes
@@ -586,7 +586,7 @@ schema CoreOamDevV1alpha2ContainerizedWorkloadStatusConditionsItems0:
586586

587587

588588
schema CoreOamDevV1alpha2ContainerizedWorkloadStatusResourcesItems0:
589-
"""
589+
r"""
590590
A ResourceReference refers to an resource managed by an OAM resource.
591591

592592
Attributes

examples/kube_resource/complex/muti_models/models/k8s/apimachinery/pkg/apis/meta/v1/managed_fields_entry.k

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Editing this file might prove futile when you re-run the KCL auto-gen generate c
66

77

88
schema ManagedFieldsEntry:
9-
"""
9+
r"""
1010
ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.
1111

1212
Attributes

examples/kube_resource/complex/muti_models/models/k8s/apimachinery/pkg/apis/meta/v1/object_meta.k

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Editing this file might prove futile when you re-run the KCL auto-gen generate c
66

77

88
schema ObjectMeta:
9-
"""
9+
r"""
1010
ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
1111

1212
Attributes

examples/kube_resource/complex/muti_models/models/k8s/apimachinery/pkg/apis/meta/v1/owner_reference.k

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Editing this file might prove futile when you re-run the KCL auto-gen generate c
66

77

88
schema OwnerReference:
9-
"""
9+
r"""
1010
OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.
1111

1212
Attributes

examples/kube_resource/simple/single_model/models/k8s/apimachinery/pkg/apis/meta/v1/managed_fields_entry.k

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Editing this file might prove futile when you re-run the KCL auto-gen generate c
66

77

88
schema ManagedFieldsEntry:
9-
"""
9+
r"""
1010
ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.
1111

1212
Attributes

examples/kube_resource/simple/single_model/models/k8s/apimachinery/pkg/apis/meta/v1/object_meta.k

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Editing this file might prove futile when you re-run the KCL auto-gen generate c
66

77

88
schema ObjectMeta:
9-
"""
9+
r"""
1010
ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
1111

1212
Attributes

examples/kube_resource/simple/single_model/models/k8s/apimachinery/pkg/apis/meta/v1/owner_reference.k

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Editing this file might prove futile when you re-run the KCL auto-gen generate c
66

77

88
schema OwnerReference:
9-
"""
9+
r"""
1010
OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.
1111

1212
Attributes

examples/kube_resource/simple/single_model/models/stable_example_com_v1_cron_tab.k

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import k8s.apimachinery.pkg.apis.meta.v1
66

77

88
schema CronTab:
9-
"""
9+
r"""
1010
stable example com v1 cron tab
1111

1212
Attributes
@@ -32,7 +32,7 @@ schema CronTab:
3232

3333

3434
schema StableExampleComV1CronTabSpec:
35-
"""
35+
r"""
3636
stable example com v1 cron tab spec
3737

3838
Attributes

examples/swagger/complex/composition/models/kennel.k

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Editing this file might prove futile when you re-run the KCL auto-gen generate c
55

66

77
schema Kennel:
8-
"""
8+
r"""
99
kennel
1010

1111
Attributes

0 commit comments

Comments
 (0)