Skip to content

Commit

Permalink
Merge branch 'main' into joshuajerin-Conductor-Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuajerin authored Mar 19, 2024
2 parents 8061991 + 0cd162a commit 5b8fb8f
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
5 changes: 3 additions & 2 deletions tembo-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ openapi-generator generate -i https://api.tembo.io/api-docs/openapi.json -g rus
#![allow(clippy::all)]
```

* Create `/temboclient/src/models/impls.rs` file & add following code to it:
* Create `temboclient/src/models/impls.rs` file & add following code to it:

```
use std::str::FromStr;
Expand Down Expand Up @@ -215,13 +215,14 @@ impl FromStr for StackType {
"OLTP" => Ok(StackType::Oltp),
"DataWarehouse" => Ok(StackType::DataWarehouse),
"Geospatial" => Ok(StackType::Geospatial),
"Timeseries" => Ok(StackType::Timeseries),
_ => Err(()),
}
}
}
```

* Add following line towards the end of `/temboclient/src/models/mod.rs`
* Add following line towards the end of `temboclient/src/models/mod.rs`

```
pub mod impls;
Expand Down
2 changes: 1 addition & 1 deletion tembo-cli/temboclient/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.1.0
7.3.0
4 changes: 2 additions & 2 deletions tembo-cli/temboclient/src/apis/instance_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
use reqwest;

use super::{configuration, Error};
use crate::{apis::ResponseContent, models::InstanceEvent};
use crate::apis::ResponseContent;
use crate::models::InstanceEvent;

/// struct for typed errors of method [`create_instance`]
#[derive(Debug, Clone, Serialize, Deserialize)]
Expand Down Expand Up @@ -134,7 +135,6 @@ pub async fn create_instance(
local_var_req_builder = local_var_req_builder.json(&create_instance);

let local_var_req = local_var_req_builder.build()?;

let local_var_resp = local_var_client.execute(local_var_req).await?;

let local_var_status = local_var_resp.status();
Expand Down
6 changes: 3 additions & 3 deletions tembo-cli/temboclient/src/apis/stack_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
use reqwest;

use super::{configuration, Error};
use crate::{apis::ResponseContent, models::StackType};
use crate::apis::ResponseContent;
use crate::models::StackType;

/// struct for typed errors of method [`get_all_entities`]
#[derive(Debug, Clone, Serialize, Deserialize)]
Expand Down Expand Up @@ -79,8 +80,7 @@ pub async fn get_entity(

let local_var_client = &local_var_configuration.client;

let local_var_uri_str =
format!("{}/api/v1/stacks/{type:?}", local_var_configuration.base_path, type=r#type);
let local_var_uri_str = format!("{}/api/v1/stacks/{type}", local_var_configuration.base_path, type=r#type.to_string());
let mut local_var_req_builder =
local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());

Expand Down
1 change: 1 addition & 0 deletions tembo-cli/temboclient/src/models/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ impl FromStr for StackType {
"Geospatial" => Ok(StackType::Geospatial),
"MongoAlternative" => Ok(StackType::MongoAlternative),
"RAG" => Ok(StackType::Rag),
"Timeseries" => Ok(StackType::Timeseries),
_ => Err(()),
}
}
Expand Down
3 changes: 3 additions & 0 deletions tembo-cli/temboclient/src/models/stack_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ pub enum StackType {
MongoAlternative,
#[serde(rename = "RAG")]
Rag,
#[serde(rename = "Timeseries")]
Timeseries,
}

impl ToString for StackType {
Expand All @@ -46,6 +48,7 @@ impl ToString for StackType {
Self::Geospatial => String::from("Geospatial"),
Self::MongoAlternative => String::from("MongoAlternative"),
Self::Rag => String::from("RAG"),
Self::Timeseries => String::from("Timeseries"),
}
}
}
Expand Down

0 comments on commit 5b8fb8f

Please sign in to comment.