-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
POC generated rust client from openapi spec
- Loading branch information
Showing
46 changed files
with
1,934 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# OpenAPI Generator Ignore | ||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator | ||
|
||
# Use this file to prevent files from being overwritten by the generator. | ||
# The patterns follow closely to .gitignore or .dockerignore. | ||
|
||
Cargo.toml | ||
docs/* | ||
README.md | ||
.gitignore | ||
.travis.yml | ||
git_push.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
src/apis/configuration.rs | ||
src/apis/default_api.rs | ||
src/apis/mod.rs | ||
src/lib.rs | ||
src/models/activation_status.rs | ||
src/models/affected_consumer.rs | ||
src/models/api_error.rs | ||
src/models/auto_discover_failure.rs | ||
src/models/auto_discover_outcome.rs | ||
src/models/auto_discover_status.rs | ||
src/models/catalog_type.rs | ||
src/models/discover_change.rs | ||
src/models/error.rs | ||
src/models/evolved_collection.rs | ||
src/models/incompatible_collection.rs | ||
src/models/inferred_schema_status.rs | ||
src/models/job_status.rs | ||
src/models/job_status_one_of.rs | ||
src/models/job_status_one_of_1.rs | ||
src/models/job_status_one_of_2.rs | ||
src/models/job_status_one_of_3.rs | ||
src/models/job_status_one_of_4.rs | ||
src/models/job_status_one_of_5.rs | ||
src/models/job_status_one_of_6.rs | ||
src/models/job_status_one_of_7.rs | ||
src/models/job_status_one_of_8.rs | ||
src/models/lock_failure.rs | ||
src/models/mod.rs | ||
src/models/publication_info.rs | ||
src/models/publication_status.rs | ||
src/models/re_create_reason.rs | ||
src/models/rejected_field.rs | ||
src/models/source_capture_status.rs | ||
src/models/status_response.rs | ||
src/models/status_response_controller_status.rs | ||
src/models/status_response_controller_status_one_of.rs | ||
src/models/status_response_controller_status_one_of_1.rs | ||
src/models/status_response_controller_status_one_of_2.rs | ||
src/models/status_response_controller_status_one_of_3.rs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
7.10.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[package] | ||
name = "control-plane-api" | ||
version.workspace = true | ||
rust-version.workspace = true | ||
edition.workspace = true | ||
authors.workspace = true | ||
homepage.workspace = true | ||
repository.workspace = true | ||
license.workspace = true | ||
|
||
[dependencies] | ||
serde = { workspace = true } | ||
serde_with = { workspace = true } | ||
serde_json = { workspace = true } | ||
serde_repr = { workspace = true } | ||
url = { workspace = true } | ||
uuid = { workspace = true } | ||
reqwest = { workspace = true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Control-plane-api | ||
|
||
All of the sources in this crate were generated by `openapi-generator` using the command: | ||
|
||
`openapi-generator -i <control-plane-openapi-spec.json> -g rust -o . --additional-properties library=reqwest-trait` | ||
|
||
The openapi spec was downloaded from a running agent instance. | ||
I think this is probably not worth using. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Flow Control Plane V0 API | ||
* | ||
* some description here | ||
* | ||
* The version of the OpenAPI document: | ||
* | ||
* Generated by: https://openapi-generator.tech | ||
*/ | ||
|
||
|
||
|
||
#[derive(Debug, Clone)] | ||
pub struct Configuration { | ||
pub base_path: String, | ||
pub user_agent: Option<String>, | ||
pub client: reqwest::Client, | ||
pub basic_auth: Option<BasicAuth>, | ||
pub oauth_access_token: Option<String>, | ||
pub bearer_access_token: Option<String>, | ||
pub api_key: Option<ApiKey>, | ||
} | ||
|
||
pub type BasicAuth = (String, Option<String>); | ||
|
||
#[derive(Debug, Clone)] | ||
pub struct ApiKey { | ||
pub prefix: Option<String>, | ||
pub key: String, | ||
} | ||
|
||
|
||
impl Configuration { | ||
pub fn new() -> Configuration { | ||
Configuration::default() | ||
} | ||
} | ||
|
||
impl Default for Configuration { | ||
fn default() -> Self { | ||
Configuration { | ||
base_path: "http://localhost".to_owned(), | ||
user_agent: Some("OpenAPI-Generator//rust".to_owned()), | ||
client: reqwest::Client::new(), | ||
basic_auth: None, | ||
oauth_access_token: None, | ||
bearer_access_token: None, | ||
api_key: None, | ||
} | ||
} | ||
} |
Oops, something went wrong.