You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The work on this project is mainly based on go-swagger, and this project just adds some
KCL-specific templates and language features to it. We are grateful and sincerely respectful for the outstanding work
in go-swagger. Meanwhile, we are working on making the customized features separated from the
basic 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
Features
The package translates Swagger OpenAPI spec and Kubernetes CRD to KCL models.
Translate Swagger OpenAPI Spec to KCL
The package now supports OpenAPI 2.0. By parsing the "Definitions" section of the spec, the KCL OpenAPI
package will extract the defined models from it and generate the corresponding KCL representation.
The package can also translate
the Kubernetes CRD to KCL models.
By parsing the spec.versions[n].schema.openAPIV3Schema (n means the latest version of the spec will be used) section of the CRD, the KCL
OpenAPI package will extract the structural schema and generate the corresponding KCL representation.
KCL OpenAPI Spec
The KCL OpenAPI Spec defines a complete specification of how OpenAPI objects are mapped to KCL language elements.