@@ -8,15 +8,24 @@ basic OpenAPI logic in go-swagger.
88Main use cases:
99
1010+ Swagger Openapi
11- + Translate Swagger OpenAPI spec to KCL code
11+ + Translate Swagger OpenAPI spec to KCL code
1212+ Kubernetes CRD
13- + Translate Kubernetes CRD to KCL code
13+ + Translate Kubernetes CRD to KCL code
1414
1515## Quick Start
1616
17- The kcl openapi tool is packaged with kusion distribution, and we highly recommend you
18- to [ install the Kusion tools package] ( https://kusionstack.io/docs/user_docs/getting-started/install ) which contains the KCL language support
19- and other tools.
17+ ### Install
18+
19+ + Since kcl openapi tool is packaged with kusion distribution, and we highly recommend you
20+ to [ install the Kusion tools package] ( https://kusionstack.io/docs/user_docs/getting-started/install ) which contains the KCL language
21+ support
22+ and other tools.
23+
24+ + Or we can only install the tool with go install:
25+
26+ ``` shell
27+ go install kusionstack.io/kcl-openapi
28+ ```
2029
2130## Features
2231
@@ -30,7 +39,7 @@ tool will extract the defined models from it and generate the corresponding KCL
3039The command is as follows:
3140
3241``` shell
33- kclopenapi generate model -f ${your_open_api_spec} -t ${the_kcl_files_output_dir}
42+ kcl-openapi generate model -f ${your_open_api_spec} -t ${the_kcl_files_output_dir}
3443```
3544
3645### Translate Kubernetes CRD to KCL
@@ -43,7 +52,7 @@ OpenAPI tool will extract the structural schema and generate the corresponding K
4352The command is as follows:
4453
4554``` shell
46- kclopenapi generate model --crd -f ${your_CRD.yaml} -t ${the_kcl_files_output_dir} --skip-validation
55+ kcl-openapi generate model --crd -f ${your_CRD.yaml} -t ${the_kcl_files_output_dir} --skip-validation
4756```
4857
4958## KCL OpenAPI Spec
0 commit comments