Skip to content

Commit 183fbe5

Browse files
Update api spec (#214)
* YOYO NEW API SPEC! * I have generated the latest API! --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent ca535f2 commit 183fbe5

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

examples_test.go

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

kittycad.go.patch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@
249249
},
250250
{
251251
"value": {
252-
"example": "// CreateProprietaryToKcl: Converts a proprietary CAD format to KCL.\n// \n// This endpoint is used to convert a proprietary CAD format to KCL. The file passed MUST have feature tree data.\n// \n// A STEP file does not have feature tree data, so it will not work. A sldprt file does have feature tree data, so it will work.\n// \n// \n// Parameters\n// \n// \t- `codeOption`: Code option for running and verifying kcl.\n// \t\t\n// \t\t\u003cdetails\u003e\u003csummary\u003eJSON schema\u003c/summary\u003e\n// \t\t\n// \t\t```json { \"title\": \"CodeOption\", \"description\": \"Code option for running and verifying kcl.\", \"type\": \"string\", \"enum\": [ \"parse\", \"execute\", \"cleanup\", \"mock_execute\" ] } ``` \u003c/details\u003e\n// \t- `body`\n// \n// CreateProprietaryToKcl: Converts a proprietary CAD format to KCL.\n// This endpoint is used to convert a proprietary CAD format to KCL. The file passed MUST have feature tree data.\n//\n// A STEP file does not have feature tree data, so it will not work. A sldprt file does have feature tree data, so it will work.\n//\n// Parameters\n//\n// - `codeOption`: Code option for running and verifying kcl.\n//\n// \u003cdetails\u003e\u003csummary\u003eJSON schema\u003c/summary\u003e\n//\n// ```json { \"title\": \"CodeOption\", \"description\": \"Code option for running and verifying kcl.\", \"type\": \"string\", \"enum\": [ \"parse\", \"execute\", \"cleanup\", \"mock_execute\" ] } ``` \u003c/details\u003e\n//\n// - `body`\nfunc ExampleMlService_CreateProprietaryToKcl() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tbuf := new(bytes.Buffer)\n\n\tresult, err := client.Ml.CreateProprietaryToKcl(kittycad.CodeOptionParse, buf)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
252+
"example": "// CreateProprietaryToKcl: Converts a proprietary CAD format to KCL.\n// \n// This endpoint is used to convert a proprietary CAD format to KCL. The file passed MUST have feature tree data.\n// \n// A STEP file does not have feature tree data, so it will not work. A sldprt file does have feature tree data, so it will work.\n// \n// Input filepaths will be normalized and re-canonicalized to be under the current working directory -- so returned paths may differ from provided paths, and care must be taken when handling user provided paths.\n// \n// \n// Parameters\n// \n// \t- `codeOption`: Code option for running and verifying kcl.\n// \t\t\n// \t\t\u003cdetails\u003e\u003csummary\u003eJSON schema\u003c/summary\u003e\n// \t\t\n// \t\t```json { \"title\": \"CodeOption\", \"description\": \"Code option for running and verifying kcl.\", \"type\": \"string\", \"enum\": [ \"parse\", \"execute\", \"cleanup\", \"mock_execute\" ] } ``` \u003c/details\u003e\n// \t- `body`\n// \n// CreateProprietaryToKcl: Converts a proprietary CAD format to KCL.\n// This endpoint is used to convert a proprietary CAD format to KCL. The file passed MUST have feature tree data.\n//\n// A STEP file does not have feature tree data, so it will not work. A sldprt file does have feature tree data, so it will work.\n//\n// Input filepaths will be normalized and re-canonicalized to be under the current working directory -- so returned paths may differ from provided paths, and care must be taken when handling user provided paths.\n//\n// Parameters\n//\n// - `codeOption`: Code option for running and verifying kcl.\n//\n// \u003cdetails\u003e\u003csummary\u003eJSON schema\u003c/summary\u003e\n//\n// ```json { \"title\": \"CodeOption\", \"description\": \"Code option for running and verifying kcl.\", \"type\": \"string\", \"enum\": [ \"parse\", \"execute\", \"cleanup\", \"mock_execute\" ] } ``` \u003c/details\u003e\n//\n// - `body`\nfunc ExampleMlService_CreateProprietaryToKcl() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tbuf := new(bytes.Buffer)\n\n\tresult, err := client.Ml.CreateProprietaryToKcl(kittycad.CodeOptionParse, buf)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
253253
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MlService.CreateProprietaryToKcl"
254254
},
255255
"op": "add",
@@ -273,7 +273,7 @@
273273
},
274274
{
275275
"value": {
276-
"example": "// CreateTextToCadMultiFileIteration: Iterate on a multi-file CAD model with a prompt.\n// \n// This endpoint can iterate on multi-file models.\n// \n// Even if you give specific ranges to edit, the model might change more than just those in order to make the changes you requested without breaking the code.\n// \n// You always get the whole code back, even if you only changed a small part of it. This endpoint will always return all the code back, including files that were not changed. If your original source code imported a stl/gltf/step/etc file, the output will not include that file since the model will never change non-kcl files. The endpoint will only return the kcl files that were changed.\n// \n// This operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n// \n// \n// Parameters\n// \n// \t- `body`: Body for iterating on models from text prompts.\n// \n// CreateTextToCadMultiFileIteration: Iterate on a multi-file CAD model with a prompt.\n// This endpoint can iterate on multi-file models.\n//\n// Even if you give specific ranges to edit, the model might change more than just those in order to make the changes you requested without breaking the code.\n//\n// You always get the whole code back, even if you only changed a small part of it. This endpoint will always return all the code back, including files that were not changed. If your original source code imported a stl/gltf/step/etc file, the output will not include that file since the model will never change non-kcl files. The endpoint will only return the kcl files that were changed.\n//\n// This operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n//\n// Parameters\n//\n// - `body`: Body for iterating on models from text prompts.\nfunc ExampleMlService_CreateTextToCadMultiFileIteration() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tbuf := new(bytes.Buffer)\n\n\tresult, err := client.Ml.CreateTextToCadMultiFileIteration(buf)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
276+
"example": "// CreateTextToCadMultiFileIteration: Iterate on a multi-file CAD model with a prompt.\n// \n// This endpoint can iterate on multi-file models.\n// \n// Even if you give specific ranges to edit, the model might change more than just those in order to make the changes you requested without breaking the code.\n// \n// You always get the whole code back, even if you only changed a small part of it. This endpoint will always return all the code back, including files that were not changed. If your original source code imported a stl/gltf/step/etc file, the output will not include that file since the model will never change non-kcl files. The endpoint will only return the kcl files that were changed.\n// \n// This operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n// \n// Input filepaths will be normalized and re-canonicalized to be under the current working directory -- so returned paths may differ from provided paths, and care must be taken when handling user provided paths.\n// \n// \n// Parameters\n// \n// \t- `body`: Body for iterating on models from text prompts.\n// \n// CreateTextToCadMultiFileIteration: Iterate on a multi-file CAD model with a prompt.\n// This endpoint can iterate on multi-file models.\n//\n// Even if you give specific ranges to edit, the model might change more than just those in order to make the changes you requested without breaking the code.\n//\n// You always get the whole code back, even if you only changed a small part of it. This endpoint will always return all the code back, including files that were not changed. If your original source code imported a stl/gltf/step/etc file, the output will not include that file since the model will never change non-kcl files. The endpoint will only return the kcl files that were changed.\n//\n// This operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n//\n// Input filepaths will be normalized and re-canonicalized to be under the current working directory -- so returned paths may differ from provided paths, and care must be taken when handling user provided paths.\n//\n// Parameters\n//\n// - `body`: Body for iterating on models from text prompts.\nfunc ExampleMlService_CreateTextToCadMultiFileIteration() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tbuf := new(bytes.Buffer)\n\n\tresult, err := client.Ml.CreateTextToCadMultiFileIteration(buf)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
277277
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MlService.CreateTextToCadMultiFileIteration"
278278
},
279279
"op": "add",

paths.go

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3919,7 +3919,7 @@
39193919
"hidden"
39203920
],
39213921
"summary": "Converts a proprietary CAD format to KCL.",
3922-
"description": "This endpoint is used to convert a proprietary CAD format to KCL. The file passed MUST have feature tree data.\n\nA STEP file does not have feature tree data, so it will not work. A sldprt file does have feature tree data, so it will work.",
3922+
"description": "This endpoint is used to convert a proprietary CAD format to KCL. The file passed MUST have feature tree data.\n\nA STEP file does not have feature tree data, so it will not work. A sldprt file does have feature tree data, so it will work.\n\nInput filepaths will be normalized and re-canonicalized to be under the current working directory -- so returned paths may differ from provided paths, and care must be taken when handling user provided paths.",
39233923
"operationId": "create_proprietary_to_kcl",
39243924
"parameters": [
39253925
{
@@ -4402,7 +4402,7 @@
44024402
"ml"
44034403
],
44044404
"summary": "Iterate on a multi-file CAD model with a prompt.",
4405-
"description": "This endpoint can iterate on multi-file models.\n\nEven if you give specific ranges to edit, the model might change more than just those in order to make the changes you requested without breaking the code.\n\nYou always get the whole code back, even if you only changed a small part of it. This endpoint will always return all the code back, including files that were not changed. If your original source code imported a stl/gltf/step/etc file, the output will not include that file since the model will never change non-kcl files. The endpoint will only return the kcl files that were changed.\n\nThis operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.",
4405+
"description": "This endpoint can iterate on multi-file models.\n\nEven if you give specific ranges to edit, the model might change more than just those in order to make the changes you requested without breaking the code.\n\nYou always get the whole code back, even if you only changed a small part of it. This endpoint will always return all the code back, including files that were not changed. If your original source code imported a stl/gltf/step/etc file, the output will not include that file since the model will never change non-kcl files. The endpoint will only return the kcl files that were changed.\n\nThis operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n\nInput filepaths will be normalized and re-canonicalized to be under the current working directory -- so returned paths may differ from provided paths, and care must be taken when handling user provided paths.",
44064406
"operationId": "create_text_to_cad_multi_file_iteration",
44074407
"requestBody": {
44084408
"description": "Iteration on a multi-file CAD model",

0 commit comments

Comments
 (0)