Skip to content

Update OpenAPI version and templates #296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/bitwarden-api-api/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.10.0
7.13.0
2 changes: 1 addition & 1 deletion crates/bitwarden-api-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ client.

- API version: latest
- Package version: 1.0.0
- Generator version: 7.10.0
- Generator version: 7.13.0
- Build package: `org.openapitools.codegen.languages.RustClientCodegen`

## Installation
Expand Down
810 changes: 448 additions & 362 deletions crates/bitwarden-api-api/src/apis/access_policies_api.rs

Large diffs are not rendered by default.

2,522 changes: 1,231 additions & 1,291 deletions crates/bitwarden-api-api/src/apis/accounts_api.rs

Large diffs are not rendered by default.

287 changes: 136 additions & 151 deletions crates/bitwarden-api-api/src/apis/accounts_billing_api.rs

Large diffs are not rendered by default.

54 changes: 26 additions & 28 deletions crates/bitwarden-api-api/src/apis/accounts_key_management_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
*/

use reqwest;
use serde::{Deserialize, Serialize};
use serde::{de::Error as _, Deserialize, Serialize};

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

/// struct for typed errors of method [`accounts_key_management_regenerate_keys_post`]
Expand All @@ -25,42 +25,40 @@ pub async fn accounts_key_management_regenerate_keys_post(
configuration: &configuration::Configuration,
key_regeneration_request_model: Option<models::KeyRegenerationRequestModel>,
) -> Result<(), Error<AccountsKeyManagementRegenerateKeysPostError>> {
let local_var_configuration = configuration;
// add a prefix to parameters to efficiently prevent name collisions
let p_key_regeneration_request_model = key_regeneration_request_model;

let local_var_client = &local_var_configuration.client;

let local_var_uri_str = format!(
let uri_str = format!(
"{}/accounts/key-management/regenerate-keys",
local_var_configuration.base_path
configuration.base_path
);
let mut local_var_req_builder =
local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
let mut req_builder = configuration
.client
.request(reqwest::Method::POST, &uri_str);

if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
local_var_req_builder =
local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
if let Some(ref user_agent) = configuration.user_agent {
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
}
if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
if let Some(ref token) = configuration.oauth_access_token {
req_builder = req_builder.bearer_auth(token.to_owned());
};
local_var_req_builder = local_var_req_builder.json(&key_regeneration_request_model);
req_builder = req_builder.json(&p_key_regeneration_request_model);

let local_var_req = local_var_req_builder.build()?;
let local_var_resp = local_var_client.execute(local_var_req).await?;
let req = req_builder.build()?;
let resp = configuration.client.execute(req).await?;

let local_var_status = local_var_resp.status();
let local_var_content = local_var_resp.text().await?;
let status = resp.status();

if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
if !status.is_client_error() && !status.is_server_error() {
Ok(())
} else {
let local_var_entity: Option<AccountsKeyManagementRegenerateKeysPostError> =
serde_json::from_str(&local_var_content).ok();
let local_var_error = ResponseContent {
status: local_var_status,
content: local_var_content,
entity: local_var_entity,
};
Err(Error::ResponseError(local_var_error))
let content = resp.text().await?;
let entity: Option<AccountsKeyManagementRegenerateKeysPostError> =
serde_json::from_str(&content).ok();
Err(Error::ResponseError(ResponseContent {
status,
content,
entity,
}))
}
}
Loading
Loading