Skip to content

Commit 6253c03

Browse files
Update api spec (#843)
* YOYO NEW API SPEC! * I have generated the latest library! --------- Co-authored-by: zoo-github-actions-auth[bot] <zoo-github-actions-auth[bot]@users.noreply.github.com>
1 parent 701038e commit 6253c03

4 files changed

Lines changed: 21 additions & 14 deletions

File tree

kittycad.rs.patch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@
275275
"op": "add",
276276
"path": "/paths/~1ml~1convert~1proprietary-to-kcl/post/x-rust",
277277
"value": {
278-
"example": "/// 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/// **Parameters:**\n/// \n/// - `code_option: Option<crate::types::CodeOption>`: The options to run on the code. By default this is set to `execute`.\nasync fn example_ml_create_proprietary_to_kcl() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::KclModel = client\n .ml()\n .create_proprietary_to_kcl(\n vec![kittycad::types::multipart::Attachment {\n name: \"thing\".to_string(),\n filepath: Some(\"myfile.json\".into()),\n content_type: Some(\"application/json\".to_string()),\n data: std::fs::read(\"myfile.json\").unwrap(),\n }],\n Some(kittycad::types::CodeOption::Cleanup),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n",
278+
"example": "/// 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/// This endpoint is designed to work with any native proprietary CAD format, for example: - SolidWorks (.sldprt) - Creo (.prt) - Catia (.catpart) - NX (.prt) - Fusion 360 (.f3d)\n/// \n/// This endpoint is deterministic, it preserves the original design intent by using the feature tree data. This endpoint does not use any machine learning or AI.\n/// \n/// This endpoint is currently in beta, and is only available to users with access to the feature. Please contact support if you are interested in getting access.\n/// \n/// This endpoint might have limitations and bugs, please report any issues you encounter. It will be improved over time.\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/// - `code_option: Option<crate::types::CodeOption>`: The options to run on the code. By default this is set to `execute`.\nasync fn example_ml_create_proprietary_to_kcl() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::KclModel = client\n .ml()\n .create_proprietary_to_kcl(\n vec![kittycad::types::multipart::Attachment {\n name: \"thing\".to_string(),\n filepath: Some(\"myfile.json\".into()),\n content_type: Some(\"application/json\".to_string()),\n data: std::fs::read(\"myfile.json\").unwrap(),\n }],\n Some(kittycad::types::CodeOption::Cleanup),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n",
279279
"libDocsLink": "https://docs.rs/kittycad/latest/kittycad/ml/struct.Ml.html#method.create_proprietary_to_kcl"
280280
}
281281
},

kittycad/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ license = "MIT"
1010

1111
[dependencies]
1212
anyhow = "1"
13-
async-trait = { version = "^0.1.89", optional = true }
13+
async-trait = { version = "^0.1.53", optional = true }
1414
base64 = "0.22"
1515
bigdecimal = { version = "0.4", features = ["serde"] }
1616
bytes = { version = "1", features = ["serde"] }
17-
clap = { version = "4.5.48", features = ["cargo", "derive", "env", "unicode"], optional = true }
17+
clap = { version = "4.2.4", features = ["cargo", "derive", "env", "unicode"], optional = true }
1818
data-encoding = "^2.3.2"
1919
dirs = { version = "^5.0.1", optional = true }
2020
format_serde_error = { version = "^0.3.0", optional = true }
@@ -27,7 +27,7 @@ parse-display = "0.10.0"
2727
phonenumber = "0.3.5"
2828
rand = { version = "0.9", optional = true }
2929
getrandom = { version = "0.3" }
30-
reqwest = { version = "0.12.23", default-features = false, features = ["json", "multipart", "rustls-tls", "rustls-tls-native-roots"], optional = true }
30+
reqwest = { version = "0.12.14", default-features = false, features = ["json", "multipart", "rustls-tls", "rustls-tls-native-roots"], optional = true }
3131
reqwest-conditional-middleware = { version = "0.4", optional = true }
3232
reqwest-middleware = { version = "0.4", optional = true, features = ["json", "multipart", "http2", "rustls-tls"] }
3333
reqwest-retry = { version = "0.7", optional = true }
@@ -45,7 +45,7 @@ uuid = { version = "1", features = ["serde", "v4", "v7"] }
4545

4646
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
4747
chrono = { version = "0.4", default-features = false, features = ["now", "serde", "std"] }
48-
tokio = { version = "1.47.1", features = ["rt", "macros"] }
48+
tokio = { version = "1.38.0", features = ["rt", "macros"] }
4949

5050
[target.'cfg(target_arch = "wasm32")'.dependencies]
5151
chrono = { version = "0.4", default-features = false, features = ["serde", "std"] }
@@ -55,7 +55,7 @@ expectorate = "1"
5555
futures-util = "^0.3.26"
5656
pretty_assertions = "1"
5757
rand = "0.9"
58-
tokio = { version = "1.47.1", features = ["rt", "macros"] }
58+
tokio = { version = "1.38.0", features = ["rt", "macros"] }
5959
tokio-tungstenite = "0.24"
6060

6161
[features]

kittycad/src/ml.rs

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,20 @@ impl Ml {
176176
#[doc = "Converts a proprietary CAD format to KCL.\n\nThis endpoint is used to convert a \
177177
proprietary CAD format to KCL. The file passed MUST have feature tree data.\n\nA STEP \
178178
file does not have feature tree data, so it will not work. A sldprt file does have \
179-
feature tree data, so it will work.\n\nInput filepaths will be normalized and \
180-
re-canonicalized to be under the current working directory -- so returned paths may \
181-
differ from provided paths, and care must be taken when handling user provided \
182-
paths.\n\n**Parameters:**\n\n- `code_option: Option<crate::types::CodeOption>`: The \
183-
options to run on the code. By default this is set to \
184-
`execute`.\n\n```rust,no_run\nasync fn example_ml_create_proprietary_to_kcl() -> \
185-
anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let \
179+
feature tree data, so it will work.\n\nThis endpoint is designed to work with any \
180+
native proprietary CAD format, for example: - SolidWorks (.sldprt) - Creo (.prt) - \
181+
Catia (.catpart) - NX (.prt) - Fusion 360 (.f3d)\n\nThis endpoint is deterministic, \
182+
it preserves the original design intent by using the feature tree data. This endpoint \
183+
does not use any machine learning or AI.\n\nThis endpoint is currently in beta, and \
184+
is only available to users with access to the feature. Please contact support if you \
185+
are interested in getting access.\n\nThis endpoint might have limitations and bugs, \
186+
please report any issues you encounter. It will be improved over time.\n\nInput \
187+
filepaths will be normalized and re-canonicalized to be under the current working \
188+
directory -- so returned paths may differ from provided paths, and care must be taken \
189+
when handling user provided paths.\n\n**Parameters:**\n\n- `code_option: \
190+
Option<crate::types::CodeOption>`: The options to run on the code. By default this is \
191+
set to `execute`.\n\n```rust,no_run\nasync fn example_ml_create_proprietary_to_kcl() \
192+
-> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let \
186193
result: kittycad::types::KclModel = client\n .ml()\n \
187194
.create_proprietary_to_kcl(\n vec![kittycad::types::multipart::Attachment \
188195
{\n name: \"thing\".to_string(),\n filepath: \

spec.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4897,7 +4897,7 @@
48974897
"hidden"
48984898
],
48994899
"summary": "Converts a proprietary CAD format to KCL.",
4900-
"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.",
4900+
"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\nThis endpoint is designed to work with any native proprietary CAD format, for example: - SolidWorks (.sldprt) - Creo (.prt) - Catia (.catpart) - NX (.prt) - Fusion 360 (.f3d)\n\nThis endpoint is deterministic, it preserves the original design intent by using the feature tree data. This endpoint does not use any machine learning or AI.\n\nThis endpoint is currently in beta, and is only available to users with access to the feature. Please contact support if you are interested in getting access.\n\nThis endpoint might have limitations and bugs, please report any issues you encounter. It will be improved over time.\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.",
49014901
"operationId": "create_proprietary_to_kcl",
49024902
"parameters": [
49034903
{

0 commit comments

Comments
 (0)