Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
Signed-off-by: Jess Frazelle <[email protected]>
  • Loading branch information
jessfraz committed Sep 20, 2024
1 parent 2bd724b commit 0d092e3
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 9,263 deletions.
2 changes: 1 addition & 1 deletion kittycad.rs.patch.json
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@
"op": "add",
"path": "/paths/~1orgs~1{id}~1enterprise~1pricing/put/x-rust",
"value": {
"example": "/// Set the enterprise price for an organization.\n/// \n/// You must be a Zoo employee to perform this request.\n/// \n/// **Parameters:**\n/// \n/// - `id: uuid::Uuid`: The organization ID. (required)\nuse std::str::FromStr;\nasync fn example_orgs_update_enterprise_pricing_for() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ZooProductSubscriptions = client\n .orgs()\n .update_enterprise_pricing_for(\n uuid::Uuid::from_str(\"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\")?,\n &kittycad::types::SubscriptionTierPrice::Enterprise {},\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n",
"example": "/// Set the enterprise price for an organization.\n/// \n/// You must be a Zoo employee to perform this request.\n/// \n/// **Parameters:**\n/// \n/// - `id: uuid::Uuid`: The organization ID. (required)\nuse std::str::FromStr;\nasync fn example_orgs_update_enterprise_pricing_for() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ZooProductSubscriptions = client\n .orgs()\n .update_enterprise_pricing_for(\n uuid::Uuid::from_str(\"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\")?,\n &kittycad::types::SubscriptionTierPrice::serde_json::Value {},\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n",
"libDocsLink": "https://docs.rs/kittycad/latest/kittycad/orgs/struct.Orgs.html#method.update_enterprise_pricing_for"
}
},
Expand Down
2 changes: 1 addition & 1 deletion kittycad/src/orgs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ impl Orgs {
kittycad::types::ZooProductSubscriptions = client\n .orgs()\n \
.update_enterprise_pricing_for(\n \
uuid::Uuid::from_str(\"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\")?,\n \
&kittycad::types::SubscriptionTierPrice::Enterprise {},\n )\n \
&kittycad::types::SubscriptionTierPrice::serde_json::Value {},\n )\n \
.await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"]
#[tracing::instrument]
pub async fn update_enterprise_pricing_for<'a>(
Expand Down
30 changes: 1 addition & 29 deletions kittycad/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3875,34 +3875,6 @@ pub enum CutType {
Chamfer,
}

#[doc = "The response from the `DefaultCameraFocusOn` command."]
#[derive(
serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
)]
pub struct DefaultCameraFocusOn {}

impl std::fmt::Display for DefaultCameraFocusOn {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
write!(
f,
"{}",
serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)?
)
}
}

#[cfg(feature = "tabled")]
impl tabled::Tabled for DefaultCameraFocusOn {
const LENGTH: usize = 0;
fn fields(&self) -> Vec<std::borrow::Cow<'static, str>> {
vec![]
}

fn headers() -> Vec<std::borrow::Cow<'static, str>> {
vec![]
}
}

#[doc = "The response from the `DefaultCameraGetSettings` command."]
#[derive(
serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema,
Expand Down Expand Up @@ -9929,7 +9901,7 @@ pub enum OkModelingCmdResponse {
#[serde(rename = "default_camera_focus_on")]
DefaultCameraFocusOn {
#[doc = "The response from the `DefaultCameraFocusOn` command."]
data: DefaultCameraFocusOn,
data: serde_json::Value,
},
#[doc = "The response to the 'SelectGet' endpoint"]
#[serde(rename = "select_get")]
Expand Down
33 changes: 0 additions & 33 deletions openapitor/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,39 +150,6 @@ fn test_oxide_generation(ctx: &mut TestContext) {
run_cargo_test(&opts).unwrap();
}

#[test_context(TestContext)]
#[test]
fn test_front_generation(ctx: &mut TestContext) {
let opts = crate::Opts {
debug: true,
json: false,
input: ctx.tmp_dir.clone(),
output: ctx.tmp_dir.clone(),
base_url: "https://api.front.com".parse().unwrap(),
name: "front-api".to_string(),
target_version: "1.0.0".to_string(),
description: "CRM crap!".to_string(),
spec_url: Some("".to_string()),
repo_name: Some("kittycad/front.rs".to_string()),
..Default::default()
};

// Load our spec.
let spec = crate::load_json_spec(include_str!("../tests/front.json")).unwrap();

// Move our test file to our output directory.
let test_file = include_str!("../tests/library/front.tests.rs");
// Write our temporary file.
let test_file_path = ctx.tmp_dir.join("src").join("tests.rs");
std::fs::write(test_file_path, test_file).unwrap();

// Generate the library.
crate::generate(&spec, &opts).unwrap();

// Run tests.
run_cargo_test(&opts).unwrap();
}

#[test_context(TestContext)]
#[test]
fn test_remote_generation(ctx: &mut TestContext) {
Expand Down
Loading

0 comments on commit 0d092e3

Please sign in to comment.