From 1219ba3784f80c92f2e994acd398c927d8607439 Mon Sep 17 00:00:00 2001 From: John Harrington <84741727+harr1424@users.noreply.github.com> Date: Thu, 18 Dec 2025 10:33:39 -0700 Subject: [PATCH 1/5] README improvements --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8b3b60115..7aeca30af 100644 --- a/README.md +++ b/README.md @@ -69,16 +69,17 @@ build the internal swagger documentation. ### Swagger generation -The first step is to generate the swagger documents from the root of the server repository. +The first step is to generate the swagger documents from the root of the [server repository](https://github.com/bitwarden/server), and then copy the resulting `api.json` and `api.public.json` to the root of the SDK repository. ```bash pwsh ./dev/generate_openapi_files.ps1 +cp api.json api.public.json /path/to/sdk-root ``` ### OpenApi Generator To generate a new version of the bindings, run the following script from the root of the SDK -project. +project: (this requires a Java Runtime Environment) ```bash ./support/build-api.sh From 3b92d60d64a409eb12dd624cdcd45b0b08b0a510 Mon Sep 17 00:00:00 2001 From: John Harrington <84741727+harr1424@users.noreply.github.com> Date: Thu, 18 Dec 2025 10:54:58 -0700 Subject: [PATCH 2/5] fix lints --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7aeca30af..83de89d71 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,9 @@ build the internal swagger documentation. ### Swagger generation -The first step is to generate the swagger documents from the root of the [server repository](https://github.com/bitwarden/server), and then copy the resulting `api.json` and `api.public.json` to the root of the SDK repository. +The first step is to generate the swagger documents from the root of the +[server repository](https://github.com/bitwarden/server), and then copy the resulting `api.json` and +`api.public.json` to the root of the SDK repository. ```bash pwsh ./dev/generate_openapi_files.ps1 From 72163aea69936d11a7148f8ed2951041ffe921d1 Mon Sep 17 00:00:00 2001 From: John Harrington <84741727+harr1424@users.noreply.github.com> Date: Thu, 18 Dec 2025 16:46:31 -0700 Subject: [PATCH 3/5] clarify script usage --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 83de89d71..542bdc843 100644 --- a/README.md +++ b/README.md @@ -70,18 +70,17 @@ build the internal swagger documentation. ### Swagger generation The first step is to generate the swagger documents from the root of the -[server repository](https://github.com/bitwarden/server), and then copy the resulting `api.json` and -`api.public.json` to the root of the SDK repository. +[server repository](https://github.com/bitwarden/server). ```bash pwsh ./dev/generate_openapi_files.ps1 -cp api.json api.public.json /path/to/sdk-root ``` ### OpenApi Generator To generate a new version of the bindings, run the following script from the root of the SDK -project: (this requires a Java Runtime Environment) +project. This requires a Java Runtime Environment, and also assumes the repositories `server` and +`sdk-internal` have the same parent directory. ```bash ./support/build-api.sh From a86a2e7d601f10ebe6f80033a4f0f60b0faa9077 Mon Sep 17 00:00:00 2001 From: John Harrington <84741727+harr1424@users.noreply.github.com> Date: Thu, 18 Dec 2025 16:59:12 -0700 Subject: [PATCH 4/5] clarify generated bindings should not be directly edited --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 542bdc843..359a14ceb 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,8 @@ are: We autogenerate the server bindings using [openapi-generator](https://github.com/OpenAPITools/openapi-generator). To do this, we first need to -build the internal swagger documentation. +build the internal swagger documentation. This code should not be directly modified, instead see the +instructions below to generate Swagger documents and use these to generate the OpenApi bindings. ### Swagger generation From efb51399f89066c68a3c33bd2c90e8412f42b9a3 Mon Sep 17 00:00:00 2001 From: John Harrington <84741727+harr1424@users.noreply.github.com> Date: Fri, 19 Dec 2025 07:11:18 -0700 Subject: [PATCH 5/5] clairify binding changes should not be checked in --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 359a14ceb..06c78b364 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,12 @@ towards modifying the templates as little as possible to ease future upgrades. - This process also changes the `Cargo.toml` file. When creating a PR updating the bindings, please revert (do not include) the updates to the `Cargo.toml` file. +> [!IMPORTANT] A GitHub workflow exists to +> [update the API bindings](https://github.com/bitwarden/sdk-internal/actions/workflows/update-api-bindings.yml). +> Running the scripts above can be helpful during local development, but please ensure that any +> changes to the bindings in `bitwarden-api-api` and `bitwarden-api-identity` are **not** checked +> into any pull request. + ## Developer tools This project recommends the use of certain developer tools and includes configurations for them to