Skip to content
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

fix: sync codegen output & pin codegen version #42

Merged
merged 3 commits into from
Mar 11, 2025
Merged
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 generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ process_directory() {
}

# Run codegen
docker run --rm -v "${PWD}:/local" -u $(id -u) openapitools/openapi-generator-cli:latest generate \
docker run --rm -v "${PWD}:/local" -u $(id -u) openapitools/openapi-generator-cli:v7.10.0 generate \
-i "/local/$file" \
-g rust \
-o /local/openapi \
Expand Down
3 changes: 1 addition & 2 deletions src/openapi/apis/authenticate_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,11 @@ pub async fn authenticate_verify_nonce(configuration: &configuration::Configurat
let local_var_resp = local_var_client.execute(local_var_req).await?;

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

if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
let local_var_content = local_var_resp.text().await?;
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_content = local_var_resp.text().await?;
let local_var_entity: Option<AuthenticateVerifyNonceError> = 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))
Expand Down
6 changes: 2 additions & 4 deletions src/openapi/apis/transactions_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,11 @@ pub async fn create_authenticate_transaction(configuration: &configuration::Conf
let local_var_resp = local_var_client.execute(local_var_req).await?;

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

if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
let local_var_content = local_var_resp.text().await?;
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_content = local_var_resp.text().await?;
let local_var_entity: Option<CreateAuthenticateTransactionError> = 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))
Expand All @@ -93,12 +92,11 @@ pub async fn create_register_transaction(configuration: &configuration::Configur
let local_var_resp = local_var_client.execute(local_var_req).await?;

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

if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
let local_var_content = local_var_resp.text().await?;
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_content = local_var_resp.text().await?;
let local_var_entity: Option<CreateRegisterTransactionError> = 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))
Expand Down
5 changes: 2 additions & 3 deletions src/openapi/apis/user_devices_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ pub async fn delete_user_devices(configuration: &configuration::Configuration, u
let local_var_resp = local_var_client.execute(local_var_req).await?;

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

if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
Ok(())
} else {
let local_var_content = local_var_resp.text().await?;
let local_var_entity: Option<DeleteUserDevicesError> = 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))
Expand All @@ -87,12 +87,11 @@ pub async fn list_user_devices(configuration: &configuration::Configuration, use
let local_var_resp = local_var_client.execute(local_var_req).await?;

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

if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
let local_var_content = local_var_resp.text().await?;
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_content = local_var_resp.text().await?;
let local_var_entity: Option<ListUserDevicesError> = 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))
Expand Down
6 changes: 2 additions & 4 deletions src/openapi/apis/users_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,11 @@ pub async fn get_user(configuration: &configuration::Configuration, user_id: &st
let local_var_resp = local_var_client.execute(local_var_req).await?;

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

if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
let local_var_content = local_var_resp.text().await?;
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_content = local_var_resp.text().await?;
let local_var_entity: Option<GetUserError> = 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))
Expand Down Expand Up @@ -122,12 +121,11 @@ pub async fn list_paginated_users(configuration: &configuration::Configuration,
let local_var_resp = local_var_client.execute(local_var_req).await?;

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

if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
let local_var_content = local_var_resp.text().await?;
serde_json::from_str(&local_var_content).map_err(Error::from)
} else {
let local_var_content = local_var_resp.text().await?;
let local_var_entity: Option<ListPaginatedUsersError> = 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))
Expand Down
Loading