Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The result of KclvmService.GetSchemaType API contains mistakes: the required values in KclType #629

Closed
amyXia1994 opened this issue Jul 31, 2023 · 0 comments · Fixed by #633
Labels
api Issues or PRs related to kcl rust native APIs and multi-lang APIs

Comments

@amyXia1994
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. make sure you have konfig repo locally in path <path-to-konfig> and create a getschema.json file with content(replace the to the real path):
{
    "file": "<path-to-konfig>/base/pkg/kusion_models/kube/frontend/server.k"
}
  1. run command:
curl -X POST \
    http://127.0.0.1:2021/api:protorpc/KclvmService.GetSchemaType \
-H  "accept: application/json" \
--data @./getschema.json 1>./result.json
  1. check the ./result.json

2. What did you expect to see? (Required)

the required field in ./getschema.json/result/schema_type_list[0].required should not contains optional attributes, such as name, renderType, sidecarContainers, ...

3. What did you see instead (Required)

all the properties are marked as required

4. What is your KCL components version? (Required)

➜  ~ kcl -V
kclVersion: 0.5.1-20ab3eb4b9179219d6837a57f5d35286
Platform: aarch64-apple-darwin
GitCommit: 18297873c31a1feb2a36a983e0f8f10f0c476da8

➜  ~ kcl-go -v
kcl-go version v0.5.0
@amyXia1994 amyXia1994 changed the title The result of [KclvmService.GetSchemaType](https://kcl-lang.io/docs/reference/xlang-api/rest-api) API contains mistakes: the required values in KclType The result of KclvmService.GetSchemaType API contains mistakes: the required values in KclType Jul 31, 2023
@Peefy Peefy added the api Issues or PRs related to kcl rust native APIs and multi-lang APIs label Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issues or PRs related to kcl rust native APIs and multi-lang APIs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants