From 026dd2190cbe674f4e08e1e329f0678062327b70 Mon Sep 17 00:00:00 2001 From: Colton Hurst Date: Thu, 21 Mar 2024 13:16:10 -0400 Subject: [PATCH 1/4] Add note about requiring the nightly toolchain for formatting --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index cdc52a7cb..94edc956f 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,12 @@ ASPNETCORE_ENVIRONMENT=development dotnet swagger tofile --output ../../identity ### OpenApi Generator +Make sure you have the nightly toolchain installed with `rustup`. We need this to run `cargo +nightly fmt` in the `build-api.sh` script below. + +```bash +rustup toolchain install nightly +``` + To generate a new version of the bindings run the following script from the root of the SDK project. ```bash From 0b5980fd549093a69613bf8ac7937110eea5602a Mon Sep 17 00:00:00 2001 From: Colton Hurst Date: Thu, 21 Mar 2024 13:30:22 -0400 Subject: [PATCH 2/4] Ran prettier --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 94edc956f..aa0dbe791 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,8 @@ ASPNETCORE_ENVIRONMENT=development dotnet swagger tofile --output ../../identity ### OpenApi Generator -Make sure you have the nightly toolchain installed with `rustup`. We need this to run `cargo +nightly fmt` in the `build-api.sh` script below. +Make sure you have the nightly toolchain installed with `rustup`. We need this to run +`cargo +nightly fmt` in the `build-api.sh` script below. ```bash rustup toolchain install nightly From 567f1dba1635812aa5c9171f1a44c1143b861b71 Mon Sep 17 00:00:00 2001 From: Colton Hurst Date: Fri, 22 Mar 2024 12:04:42 -0400 Subject: [PATCH 3/4] Move the nightly install to build-api.sh --- README.md | 9 ++------- support/build-api.sh | 1 + 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index aa0dbe791..5bcef91f6 100644 --- a/README.md +++ b/README.md @@ -76,13 +76,6 @@ ASPNETCORE_ENVIRONMENT=development dotnet swagger tofile --output ../../identity ### OpenApi Generator -Make sure you have the nightly toolchain installed with `rustup`. We need this to run -`cargo +nightly fmt` in the `build-api.sh` script below. - -```bash -rustup toolchain install nightly -``` - To generate a new version of the bindings run the following script from the root of the SDK project. ```bash @@ -93,6 +86,8 @@ This project uses customized templates which lives in the `support/openapi-templ These templates resolves some outstanding issues we've experienced with the rust generator. But we strive towards modifying the templates as little as possible to ease future upgrades. +Note: If you don't have the nightly toolchain installed, the `build-api.sh` script will install it for you. + ## Tests Many of the SDK tests are based on encrypted data provided by the other Bitwarden clients. In order diff --git a/support/build-api.sh b/support/build-api.sh index a668b5564..ea295a523 100755 --- a/support/build-api.sh +++ b/support/build-api.sh @@ -22,5 +22,6 @@ npx openapi-generator-cli generate \ -t ./support/openapi-template \ --additional-properties=packageVersion=1.0.0 +rustup toolchain install nightly cargo +nightly fmt npm run prettier From 45fb1b6ccfe75cb830fd4106b2ec9b015913198a Mon Sep 17 00:00:00 2001 From: Colton Hurst Date: Fri, 22 Mar 2024 15:01:26 -0400 Subject: [PATCH 4/4] Ran prettier --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5bcef91f6..a1ef88b7d 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,8 @@ This project uses customized templates which lives in the `support/openapi-templ These templates resolves some outstanding issues we've experienced with the rust generator. But we strive towards modifying the templates as little as possible to ease future upgrades. -Note: If you don't have the nightly toolchain installed, the `build-api.sh` script will install it for you. +Note: If you don't have the nightly toolchain installed, the `build-api.sh` script will install it +for you. ## Tests