- Notifications
You must be signed in to change notification settings - Fork8
kcl-lang/kcl-openapi
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
The work on this project is mainly based ongo-swagger, and this project just adds someKCL-specific templates and language features to it. We are grateful and sincerely respectful for the outstanding workingo-swagger. Meanwhile, we are working on making the customized features separated from thebasic OpenAPI logic in go-swagger.
Main use cases:
- Swagger OpenAPI
- Translate Swagger OpenAPI spec to KCL code
- Kubernetes CRD
- Translate Kubernetes CRD to KCL code
The package translates Swagger OpenAPI spec and Kubernetes CRD to KCL models.
The package now supportsOpenAPI 2.0. By parsing the "Definitions" section of the spec, the KCL OpenAPIpackage will extract the defined models from it and generate the corresponding KCL representation.
Note: TheKubernetes KCL models among all versions are pre-generated, you get it by executing
kcl mod add k8s:<version>
under your project. Alternatively, if you may want to generate them yourself, please referGenerate KCL Packages from Kubernetes OpenAPI Specs.
The package can also translatetheKubernetes CRD to KCL models.By parsing thespec.versions[n].schema.openAPIV3Schema
(n means the latest version of the spec will be used) section of the CRD, the KCLOpenAPI package will extract the structural schema and generate the corresponding KCL representation.
TheKCL OpenAPI Spec defines a complete specification of how OpenAPI objects are mapped to KCL language elements.
Apache License Version 2.0
About
KCL OpenAPI Integration
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors8
Uh oh!
There was an error while loading.Please reload this page.