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

Update api specs from conserv #599

Open
wants to merge 4 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
16 changes: 14 additions & 2 deletions crates/cloudtruth-restapi/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ docs/EnvironmentCopy.md
docs/EnvironmentCreate.md
docs/EnvironmentUpdate.md
docs/EnvironmentsApi.md
docs/FeaturesAiChatResponse.md
docs/FeaturesApi.md
docs/FeaturesResponse.md
docs/GeneratedPasswordResponse.md
Expand All @@ -56,6 +57,7 @@ docs/GitHubPull.md
docs/GitHubPullTask.md
docs/GitHubPullTaskStep.md
docs/Grant.md
docs/GrantUpdate.md
docs/GrantsApi.md
docs/Group.md
docs/GroupsApi.md
Expand Down Expand Up @@ -146,7 +148,7 @@ docs/PatchedAzureKeyVaultPull.md
docs/PatchedAzureKeyVaultPushUpdate.md
docs/PatchedEnvironmentUpdate.md
docs/PatchedGitHubPull.md
docs/PatchedGrant.md
docs/PatchedGrantUpdate.md
docs/PatchedGroup.md
docs/PatchedInvitation.md
docs/PatchedMembership.md
Expand All @@ -159,6 +161,7 @@ docs/PatchedProjectUpdate.md
docs/PatchedServiceAccount.md
docs/PatchedTagUpdate.md
docs/PatchedTemplateUpdate.md
docs/PatchedUpdateUser.md
docs/PatchedValueUpdate.md
docs/Project.md
docs/ProjectCopy.md
Expand All @@ -167,8 +170,10 @@ docs/ProjectUpdate.md
docs/ProjectsApi.md
docs/RoleEnum.md
docs/ServiceAccount.md
docs/ServiceAccountApiKey.md
docs/ServiceAccountCreateRequest.md
docs/ServiceAccountCreateResponse.md
docs/ServiceAccountRekeyRequest.md
docs/ServiceAccountUpdateRequest.md
docs/ServiceaccountsApi.md
docs/StateEnum.md
Expand All @@ -189,6 +194,7 @@ docs/TemplateTimelineEntry.md
docs/TemplateTimelineEntryTemplate.md
docs/TemplateUpdate.md
docs/TypesApi.md
docs/UpdateUser.md
docs/User.md
docs/UsersApi.md
docs/UtilsApi.md
Expand Down Expand Up @@ -258,6 +264,7 @@ src/models/environment.rs
src/models/environment_copy.rs
src/models/environment_create.rs
src/models/environment_update.rs
src/models/features_ai_chat_response.rs
src/models/features_response.rs
src/models/generated_password_response.rs
src/models/git_hub_integration.rs
Expand All @@ -266,6 +273,7 @@ src/models/git_hub_pull.rs
src/models/git_hub_pull_task.rs
src/models/git_hub_pull_task_step.rs
src/models/grant.rs
src/models/grant_update.rs
src/models/group.rs
src/models/history_model_enum.rs
src/models/history_type_enum.rs
Expand Down Expand Up @@ -350,7 +358,7 @@ src/models/patched_azure_key_vault_pull.rs
src/models/patched_azure_key_vault_push_update.rs
src/models/patched_environment_update.rs
src/models/patched_git_hub_pull.rs
src/models/patched_grant.rs
src/models/patched_grant_update.rs
src/models/patched_group.rs
src/models/patched_invitation.rs
src/models/patched_membership.rs
Expand All @@ -363,15 +371,18 @@ src/models/patched_project_update.rs
src/models/patched_service_account.rs
src/models/patched_tag_update.rs
src/models/patched_template_update.rs
src/models/patched_update_user.rs
src/models/patched_value_update.rs
src/models/project.rs
src/models/project_copy.rs
src/models/project_create.rs
src/models/project_update.rs
src/models/role_enum.rs
src/models/service_account.rs
src/models/service_account_api_key.rs
src/models/service_account_create_request.rs
src/models/service_account_create_response.rs
src/models/service_account_rekey_request.rs
src/models/service_account_update_request.rs
src/models/state_enum.rs
src/models/status_enum.rs
Expand All @@ -390,6 +401,7 @@ src/models/template_timeline.rs
src/models/template_timeline_entry.rs
src/models/template_timeline_entry_template.rs
src/models/template_update.rs
src/models/update_user.rs
src/models/user.rs
src/models/value.rs
src/models/value_create.rs
Expand Down
16 changes: 13 additions & 3 deletions crates/cloudtruth-restapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CloudTruth centralizes your configuration parameters and secrets making them eas

This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client.

- API version: v1
- API version: 1.0.0
- Package version: 1.0.0
- Build package: `org.openapitools.codegen.languages.RustClientCodegen`

Expand Down Expand Up @@ -44,6 +44,7 @@ Class | Method | HTTP request | Description
*EnvironmentsApi* | [**environments_tags_retrieve**](docs/EnvironmentsApi.md#environments_tags_retrieve) | **GET** /api/v1/environments/{environment_pk}/tags/{id}/ |
*EnvironmentsApi* | [**environments_tags_update**](docs/EnvironmentsApi.md#environments_tags_update) | **PUT** /api/v1/environments/{environment_pk}/tags/{id}/ |
*EnvironmentsApi* | [**environments_update**](docs/EnvironmentsApi.md#environments_update) | **PUT** /api/v1/environments/{id}/ |
*FeaturesApi* | [**features_aichat_retrieve**](docs/FeaturesApi.md#features_aichat_retrieve) | **GET** /api/v1/features/aichat/ |
*FeaturesApi* | [**features_retrieve**](docs/FeaturesApi.md#features_retrieve) | **GET** /api/v1/features/ |
*GrantsApi* | [**grants_create**](docs/GrantsApi.md#grants_create) | **POST** /api/v1/grants/ |
*GrantsApi* | [**grants_destroy**](docs/GrantsApi.md#grants_destroy) | **DELETE** /api/v1/grants/{id}/ |
Expand Down Expand Up @@ -197,8 +198,9 @@ Class | Method | HTTP request | Description
*ServiceaccountsApi* | [**serviceaccounts_destroy**](docs/ServiceaccountsApi.md#serviceaccounts_destroy) | **DELETE** /api/v1/serviceaccounts/{id}/ |
*ServiceaccountsApi* | [**serviceaccounts_list**](docs/ServiceaccountsApi.md#serviceaccounts_list) | **GET** /api/v1/serviceaccounts/ |
*ServiceaccountsApi* | [**serviceaccounts_partial_update**](docs/ServiceaccountsApi.md#serviceaccounts_partial_update) | **PATCH** /api/v1/serviceaccounts/{id}/ |
*ServiceaccountsApi* | [**serviceaccounts_rekey_create**](docs/ServiceaccountsApi.md#serviceaccounts_rekey_create) | **POST** /api/v1/serviceaccounts/{id}/rekey/ |
*ServiceaccountsApi* | [**serviceaccounts_retrieve**](docs/ServiceaccountsApi.md#serviceaccounts_retrieve) | **GET** /api/v1/serviceaccounts/{id}/ |
*ServiceaccountsApi* | [**serviceaccounts_update**](docs/ServiceaccountsApi.md#serviceaccounts_update) | **PUT** /api/v1/serviceaccounts/{id}/ |
*ServiceaccountsApi* | [**serviceaccounts_update**](docs/ServiceaccountsApi.md#serviceaccounts_update) | **PUT** /api/v1/serviceaccounts/{id}/ | Update a ServiceAccount user.
*TypesApi* | [**types_create**](docs/TypesApi.md#types_create) | **POST** /api/v1/types/ |
*TypesApi* | [**types_destroy**](docs/TypesApi.md#types_destroy) | **DELETE** /api/v1/types/{id}/ |
*TypesApi* | [**types_list**](docs/TypesApi.md#types_list) | **GET** /api/v1/types/ |
Expand All @@ -214,7 +216,9 @@ Class | Method | HTTP request | Description
*UsersApi* | [**users_current_retrieve**](docs/UsersApi.md#users_current_retrieve) | **GET** /api/v1/users/current/ | Current user information
*UsersApi* | [**users_destroy**](docs/UsersApi.md#users_destroy) | **DELETE** /api/v1/users/{id}/ | Delete the specified user.
*UsersApi* | [**users_list**](docs/UsersApi.md#users_list) | **GET** /api/v1/users/ |
*UsersApi* | [**users_partial_update**](docs/UsersApi.md#users_partial_update) | **PATCH** /api/v1/users/{id}/ |
*UsersApi* | [**users_retrieve**](docs/UsersApi.md#users_retrieve) | **GET** /api/v1/users/{id}/ |
*UsersApi* | [**users_update**](docs/UsersApi.md#users_update) | **PUT** /api/v1/users/{id}/ |
*UtilsApi* | [**utils_generate_password_create**](docs/UtilsApi.md#utils_generate_password_create) | **POST** /api/v1/utils/generate_password/ | Get a randomly generated password using AWS Secrets Manager, with fallback to /dev/urandom.


Expand Down Expand Up @@ -261,6 +265,7 @@ Class | Method | HTTP request | Description
- [EnvironmentCopy](docs/EnvironmentCopy.md)
- [EnvironmentCreate](docs/EnvironmentCreate.md)
- [EnvironmentUpdate](docs/EnvironmentUpdate.md)
- [FeaturesAiChatResponse](docs/FeaturesAiChatResponse.md)
- [FeaturesResponse](docs/FeaturesResponse.md)
- [GeneratedPasswordResponse](docs/GeneratedPasswordResponse.md)
- [GitHubIntegration](docs/GitHubIntegration.md)
Expand All @@ -269,6 +274,7 @@ Class | Method | HTTP request | Description
- [GitHubPullTask](docs/GitHubPullTask.md)
- [GitHubPullTaskStep](docs/GitHubPullTaskStep.md)
- [Grant](docs/Grant.md)
- [GrantUpdate](docs/GrantUpdate.md)
- [Group](docs/Group.md)
- [HistoryModelEnum](docs/HistoryModelEnum.md)
- [HistoryTypeEnum](docs/HistoryTypeEnum.md)
Expand Down Expand Up @@ -352,7 +358,7 @@ Class | Method | HTTP request | Description
- [PatchedAzureKeyVaultPushUpdate](docs/PatchedAzureKeyVaultPushUpdate.md)
- [PatchedEnvironmentUpdate](docs/PatchedEnvironmentUpdate.md)
- [PatchedGitHubPull](docs/PatchedGitHubPull.md)
- [PatchedGrant](docs/PatchedGrant.md)
- [PatchedGrantUpdate](docs/PatchedGrantUpdate.md)
- [PatchedGroup](docs/PatchedGroup.md)
- [PatchedInvitation](docs/PatchedInvitation.md)
- [PatchedMembership](docs/PatchedMembership.md)
Expand All @@ -365,15 +371,18 @@ Class | Method | HTTP request | Description
- [PatchedServiceAccount](docs/PatchedServiceAccount.md)
- [PatchedTagUpdate](docs/PatchedTagUpdate.md)
- [PatchedTemplateUpdate](docs/PatchedTemplateUpdate.md)
- [PatchedUpdateUser](docs/PatchedUpdateUser.md)
- [PatchedValueUpdate](docs/PatchedValueUpdate.md)
- [Project](docs/Project.md)
- [ProjectCopy](docs/ProjectCopy.md)
- [ProjectCreate](docs/ProjectCreate.md)
- [ProjectUpdate](docs/ProjectUpdate.md)
- [RoleEnum](docs/RoleEnum.md)
- [ServiceAccount](docs/ServiceAccount.md)
- [ServiceAccountApiKey](docs/ServiceAccountApiKey.md)
- [ServiceAccountCreateRequest](docs/ServiceAccountCreateRequest.md)
- [ServiceAccountCreateResponse](docs/ServiceAccountCreateResponse.md)
- [ServiceAccountRekeyRequest](docs/ServiceAccountRekeyRequest.md)
- [ServiceAccountUpdateRequest](docs/ServiceAccountUpdateRequest.md)
- [StateEnum](docs/StateEnum.md)
- [StatusEnum](docs/StatusEnum.md)
Expand All @@ -392,6 +401,7 @@ Class | Method | HTTP request | Description
- [TemplateTimelineEntry](docs/TemplateTimelineEntry.md)
- [TemplateTimelineEntryTemplate](docs/TemplateTimelineEntryTemplate.md)
- [TemplateUpdate](docs/TemplateUpdate.md)
- [UpdateUser](docs/UpdateUser.md)
- [User](docs/User.md)
- [Value](docs/Value.md)
- [ValueCreate](docs/ValueCreate.md)
Expand Down
2 changes: 1 addition & 1 deletion crates/cloudtruth-restapi/src/apis/api_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team.
*
* The version of the OpenAPI document: v1
* The version of the OpenAPI document: 1.0.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/cloudtruth-restapi/src/apis/audit_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team.
*
* The version of the OpenAPI document: v1
* The version of the OpenAPI document: 1.0.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
*/
Expand Down
2 changes: 1 addition & 1 deletion crates/cloudtruth-restapi/src/apis/backup_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team.
*
* The version of the OpenAPI document: v1
* The version of the OpenAPI document: 1.0.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
*/
Expand Down
4 changes: 2 additions & 2 deletions crates/cloudtruth-restapi/src/apis/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team.
*
* The version of the OpenAPI document: v1
* The version of the OpenAPI document: 1.0.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
*/
Expand Down Expand Up @@ -49,7 +49,7 @@ impl Default for Configuration {
fn default() -> Self {
Configuration {
base_path: "http://localhost".to_owned(),
user_agent: Some("OpenAPI-Generator/v1/rust".to_owned()),
user_agent: Some("OpenAPI-Generator/1.0.0/rust".to_owned()),
client: reqwest::Client::new(),
basic_auth: None,
oauth_access_token: None,
Expand Down
2 changes: 1 addition & 1 deletion crates/cloudtruth-restapi/src/apis/environments_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team.
*
* The version of the OpenAPI document: v1
* The version of the OpenAPI document: 1.0.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
*/
Expand Down
86 changes: 85 additions & 1 deletion crates/cloudtruth-restapi/src/apis/features_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team.
*
* The version of the OpenAPI document: v1
* The version of the OpenAPI document: 1.0.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
*/
Expand All @@ -14,13 +14,97 @@ use std::time::Instant;
use super::{configuration, Error};
use crate::apis::{handle_serde_error, ResponseContent};

/// struct for typed errors of method [`features_aichat_retrieve`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum FeaturesAichatRetrieveError {
UnknownValue(serde_json::Value),
}

/// struct for typed errors of method [`features_retrieve`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum FeaturesRetrieveError {
UnknownValue(serde_json::Value),
}

/// Returns details about enabled features for AI Chat
pub fn features_aichat_retrieve(
configuration: &configuration::Configuration,
) -> Result<crate::models::FeaturesAiChatResponse, Error<FeaturesAichatRetrieveError>> {
let local_var_configuration = configuration;

let local_var_client = &local_var_configuration.client;

let local_var_uri_str = format!(
"{}/api/v1/features/aichat/",
local_var_configuration.base_path
);
let mut local_var_req_builder =
local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_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 local_var_token) = local_var_configuration.bearer_access_token {
local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
};
if let Some(ref local_var_apikey) = local_var_configuration.api_key {
let local_var_key = local_var_apikey.key.clone();
let local_var_value = match local_var_apikey.prefix {
Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
None => local_var_key,
};
local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
};
if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
};

let local_var_req = local_var_req_builder.build()?;
let method = local_var_req.method().clone();
let start = Instant::now();
let mut local_var_resp = local_var_client.execute(local_var_req)?;
if local_var_configuration.rest_debug {
let duration = start.elapsed();
println!(
"URL {} {} elapsed: {:?}",
method,
&local_var_resp.url(),
duration
);
}

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

if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
if local_var_configuration.debug_success(super::function!()) {
println!("RESP {} {}", &local_var_status, &local_var_content);
}

serde_json::from_str(&local_var_content)
.map_err(|e| handle_serde_error(e, &method, local_var_resp.url(), &local_var_content))
} else {
let local_var_entity: Option<FeaturesAichatRetrieveError> =
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,
};
if local_var_configuration.rest_debug {
println!(
"RESP {} {}",
&local_var_error.status, &local_var_error.content
);
}
Err(Error::ResponseError(local_var_error))
}
}

/// Returns a dictionary of features and whether or not they are enabled
pub fn features_retrieve(
configuration: &configuration::Configuration,
Expand Down
10 changes: 5 additions & 5 deletions crates/cloudtruth-restapi/src/apis/grants_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* CloudTruth centralizes your configuration parameters and secrets making them easier to manage and use as a team.
*
* The version of the OpenAPI document: v1
* The version of the OpenAPI document: 1.0.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
*/
Expand Down Expand Up @@ -406,7 +406,7 @@ pub fn grants_multi_destroy(
pub fn grants_partial_update(
configuration: &configuration::Configuration,
id: &str,
patched_grant: Option<crate::models::PatchedGrant>,
patched_grant_update: Option<crate::models::PatchedGrantUpdate>,
) -> Result<crate::models::Grant, Error<GrantsPartialUpdateError>> {
let local_var_configuration = configuration;

Expand Down Expand Up @@ -439,7 +439,7 @@ pub fn grants_partial_update(
if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
};
local_var_req_builder = local_var_req_builder.json(&patched_grant);
local_var_req_builder = local_var_req_builder.json(&patched_grant_update);

let local_var_req = local_var_req_builder.build()?;
let method = local_var_req.method().clone();
Expand Down Expand Up @@ -566,7 +566,7 @@ pub fn grants_retrieve(
pub fn grants_update(
configuration: &configuration::Configuration,
id: &str,
grant: crate::models::Grant,
grant_update: crate::models::GrantUpdate,
) -> Result<crate::models::Grant, Error<GrantsUpdateError>> {
let local_var_configuration = configuration;

Expand Down Expand Up @@ -599,7 +599,7 @@ pub fn grants_update(
if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
};
local_var_req_builder = local_var_req_builder.json(&grant);
local_var_req_builder = local_var_req_builder.json(&grant_update);

let local_var_req = local_var_req_builder.build()?;
let method = local_var_req.method().clone();
Expand Down
Loading
Loading