Skip to content

Commit

Permalink
Merge branch 'main' into ps/msrv
Browse files Browse the repository at this point in the history
  • Loading branch information
dani-garcia committed Feb 12, 2024
2 parents d67df5d + 2290bc8 commit 79c689d
Show file tree
Hide file tree
Showing 473 changed files with 5,116 additions and 2,220 deletions.
436 changes: 199 additions & 237 deletions Cargo.lock

Large diffs are not rendered by default.

20 changes: 3 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,32 +57,18 @@ The first step is to generate the swagger documents from the server repository.

```bash
# src/Api
dotnet swagger tofile --output ../../api.json ./bin/Debug/net6.0/Api.dll internal
dotnet swagger tofile --output ../../api.json ./bin/Debug/net8.0/Api.dll internal

# src/Identity
ASPNETCORE_ENVIRONMENT=development dotnet swagger tofile --output ../../identity.json ./bin/Debug/net6.0/Identity.dll v1
ASPNETCORE_ENVIRONMENT=development dotnet swagger tofile --output ../../identity.json ./bin/Debug/net8.0/Identity.dll v1
```

### OpenApi Generator

Runs from the root of the SDK project.

```bash
npx openapi-generator-cli generate \
-i ../server/api.json \
-g rust \
-o crates/bitwarden-api-api \
--package-name bitwarden-api-api \
-t ./support/openapi-template \
--additional-properties=packageVersion=1.0.0

npx openapi-generator-cli generate \
-i ../server/identity.json \
-g rust \
-o crates/bitwarden-api-identity \
--package-name bitwarden-api-identity \
-t ./support/openapi-template \
--additional-properties=packageVersion=1.0.0
./support/build-api.sh
```

OpenApi Generator works using templates, we have customized our templates to work better with our
Expand Down
2 changes: 0 additions & 2 deletions crates/bitwarden-api-api/.openapi-generator-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@
docs/*.md
.travis.yml
git_push.sh

src/models/organization_user_status_type.rs
39 changes: 36 additions & 3 deletions crates/bitwarden-api-api/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ src/apis/provider_users_api.rs
src/apis/providers_api.rs
src/apis/push_api.rs
src/apis/secrets_api.rs
src/apis/secrets_manager_events_api.rs
src/apis/secrets_manager_porting_api.rs
src/apis/self_hosted_organization_licenses_api.rs
src/apis/self_hosted_organization_sponsorships_api.rs
Expand All @@ -46,6 +47,7 @@ src/apis/sync_api.rs
src/apis/trash_api.rs
src/apis/two_factor_api.rs
src/apis/users_api.rs
src/apis/web_authn_api.rs
src/lib.rs
src/models/access_policies_create_request.rs
src/models/access_policy_request.rs
Expand All @@ -55,17 +57,26 @@ src/models/access_token_creation_response_model.rs
src/models/access_token_response_model.rs
src/models/access_token_response_model_list_response_model.rs
src/models/admin_auth_request_update_request_model.rs
src/models/algorithm.rs
src/models/api_key_response_model.rs
src/models/assertion_options.rs
src/models/assertion_response.rs
src/models/attachment_request_model.rs
src/models/attachment_response_model.rs
src/models/attachment_upload_data_response_model.rs
src/models/attestation_conveyance_preference.rs
src/models/auth_request_create_request_model.rs
src/models/auth_request_response_model.rs
src/models/auth_request_response_model_list_response_model.rs
src/models/auth_request_type.rs
src/models/auth_request_update_request_model.rs
src/models/authentication_extensions_client_inputs.rs
src/models/authentication_extensions_client_outputs.rs
src/models/authenticator_assertion_raw_response.rs
src/models/authenticator_attachment.rs
src/models/authenticator_attestation_raw_response.rs
src/models/authenticator_selection.rs
src/models/authenticator_transport.rs
src/models/base_access_policy_response_model.rs
src/models/base_secret_response_model.rs
src/models/base_secret_response_model_list_response_model.rs
Expand All @@ -80,7 +91,7 @@ src/models/billing_subscription_item.rs
src/models/billing_subscription_upcoming_invoice.rs
src/models/billing_transaction.rs
src/models/bit_pay_invoice_request_model.rs
src/models/bitwarden_product_type.rs
src/models/bulk_collection_access_request_model.rs
src/models/bulk_delete_response_model.rs
src/models/bulk_delete_response_model_list_response_model.rs
src/models/bulk_deny_admin_auth_request_request_model.rs
Expand All @@ -94,6 +105,7 @@ src/models/cipher_collections_request_model.rs
src/models/cipher_create_request_model.rs
src/models/cipher_details_response_model.rs
src/models/cipher_details_response_model_list_response_model.rs
src/models/cipher_fido2_credential_model.rs
src/models/cipher_field_model.rs
src/models/cipher_identity_model.rs
src/models/cipher_login_model.rs
Expand Down Expand Up @@ -121,6 +133,7 @@ src/models/collection_response_model.rs
src/models/collection_response_model_list_response_model.rs
src/models/collection_with_id_request_model.rs
src/models/config_response_model.rs
src/models/credential_create_options.rs
src/models/delete_recover_request_model.rs
src/models/device_keys_request_model.rs
src/models/device_keys_update_request_model.rs
Expand All @@ -145,11 +158,13 @@ src/models/emergency_access_takeover_response_model.rs
src/models/emergency_access_type.rs
src/models/emergency_access_update_request_model.rs
src/models/emergency_access_view_response_model.rs
src/models/emergency_access_with_id_request_model.rs
src/models/environment_config_response_model.rs
src/models/event_response_model.rs
src/models/event_response_model_list_response_model.rs
src/models/event_system_user.rs
src/models/event_type.rs
src/models/fido2_user.rs
src/models/field_type.rs
src/models/file_upload_type.rs
src/models/folder_request_model.rs
Expand All @@ -168,7 +183,6 @@ src/models/group_project_access_policy_response_model.rs
src/models/group_request_model.rs
src/models/group_response_model.rs
src/models/group_service_account_access_policy_response_model.rs
src/models/iap_check_request_model.rs
src/models/import_ciphers_request_model.rs
src/models/import_organization_ciphers_request_model.rs
src/models/import_organization_users_request_model.rs
Expand All @@ -194,6 +208,7 @@ src/models/organization_api_key_information_list_response_model.rs
src/models/organization_api_key_request_model.rs
src/models/organization_api_key_type.rs
src/models/organization_auto_enroll_status_response_model.rs
src/models/organization_collection_management_update_request_model.rs
src/models/organization_connection_request_model.rs
src/models/organization_connection_response_model.rs
src/models/organization_connection_type.rs
Expand All @@ -208,6 +223,7 @@ src/models/organization_keys_response_model.rs
src/models/organization_license.rs
src/models/organization_public_key_response_model.rs
src/models/organization_response_model.rs
src/models/organization_risks_subscription_failure_response_model.rs
src/models/organization_seat_request_model.rs
src/models/organization_sponsorship_create_request_model.rs
src/models/organization_sponsorship_redeem_request_model.rs
Expand Down Expand Up @@ -237,6 +253,7 @@ src/models/organization_user_public_key_response_model_list_response_model.rs
src/models/organization_user_reset_password_details_response_model.rs
src/models/organization_user_reset_password_enrollment_request_model.rs
src/models/organization_user_reset_password_request_model.rs
src/models/organization_user_status_type.rs
src/models/organization_user_type.rs
src/models/organization_user_update_groups_request_model.rs
src/models/organization_user_update_request_model.rs
Expand All @@ -245,12 +262,14 @@ src/models/organization_user_user_details_response_model_list_response_model.rs
src/models/organization_verify_bank_request_model.rs
src/models/other_device_keys_update_request_model.rs
src/models/password_hint_request_model.rs
src/models/password_manager_plan_features_response_model.rs
src/models/password_request_model.rs
src/models/payment_method_type.rs
src/models/payment_request_model.rs
src/models/payment_response_model.rs
src/models/pending_organization_auth_request_response_model.rs
src/models/pending_organization_auth_request_response_model_list_response_model.rs
src/models/people_access_policies_request_model.rs
src/models/permissions.rs
src/models/plan_response_model.rs
src/models/plan_response_model_list_response_model.rs
Expand All @@ -272,6 +291,7 @@ src/models/profile_provider_response_model.rs
src/models/profile_response_model.rs
src/models/project_access_policies_response_model.rs
src/models/project_create_request_model.rs
src/models/project_people_access_policies_response_model.rs
src/models/project_response_model.rs
src/models/project_response_model_list_response_model.rs
src/models/project_update_request_model.rs
Expand Down Expand Up @@ -301,13 +321,17 @@ src/models/provider_user_type.rs
src/models/provider_user_update_request_model.rs
src/models/provider_user_user_details_response_model.rs
src/models/provider_user_user_details_response_model_list_response_model.rs
src/models/pub_key_cred_param.rs
src/models/public_key_credential_descriptor.rs
src/models/public_key_credential_rp_entity.rs
src/models/public_key_credential_type.rs
src/models/push_registration_request_model.rs
src/models/push_send_request_model.rs
src/models/push_type.rs
src/models/push_update_request_model.rs
src/models/register_request_model.rs
src/models/register_response_model.rs
src/models/reset_password_with_org_id_request_model.rs
src/models/response_data.rs
src/models/revoke_access_tokens_request.rs
src/models/saml2_binding_type.rs
Expand All @@ -320,6 +344,7 @@ src/models/secret_update_request_model.rs
src/models/secret_verification_request_model.rs
src/models/secret_with_projects_inner_project.rs
src/models/secret_with_projects_list_response_model.rs
src/models/secrets_manager_plan_features_response_model.rs
src/models/secrets_manager_subscribe_request_model.rs
src/models/secrets_manager_subscription_update_request_model.rs
src/models/secrets_with_projects_inner_secret.rs
Expand All @@ -337,8 +362,8 @@ src/models/send_text_model.rs
src/models/send_type.rs
src/models/send_with_id_request_model.rs
src/models/server_config_response_model.rs
src/models/service_account_access_policies_response_model.rs
src/models/service_account_create_request_model.rs
src/models/service_account_people_access_policies_response_model.rs
src/models/service_account_project_access_policy_response_model.rs
src/models/service_account_project_access_policy_response_model_list_response_model.rs
src/models/service_account_response_model.rs
Expand Down Expand Up @@ -391,6 +416,14 @@ src/models/user_key_response_model.rs
src/models/user_license.rs
src/models/user_project_access_policy_response_model.rs
src/models/user_service_account_access_policy_response_model.rs
src/models/user_verification_requirement.rs
src/models/verify_delete_recover_request_model.rs
src/models/verify_email_request_model.rs
src/models/verify_otp_request_model.rs
src/models/web_authn_credential_create_options_response_model.rs
src/models/web_authn_credential_response_model.rs
src/models/web_authn_credential_response_model_list_response_model.rs
src/models/web_authn_login_assertion_options_response_model.rs
src/models/web_authn_login_credential_create_request_model.rs
src/models/web_authn_login_credential_update_request_model.rs
src/models/web_authn_prf_status.rs
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 @@
6.5.0
7.2.0
Loading

0 comments on commit 79c689d

Please sign in to comment.