From 567f1dba1635812aa5c9171f1a44c1143b861b71 Mon Sep 17 00:00:00 2001 From: Colton Hurst Date: Fri, 22 Mar 2024 12:04:42 -0400 Subject: [PATCH] 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