diff --git a/README.md b/README.md index 8b3b60115..06c78b364 100644 --- a/README.md +++ b/README.md @@ -65,11 +65,13 @@ 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 -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). ```bash pwsh ./dev/generate_openapi_files.ps1 @@ -78,7 +80,8 @@ pwsh ./dev/generate_openapi_files.ps1 ### 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, and also assumes the repositories `server` and +`sdk-internal` have the same parent directory. ```bash ./support/build-api.sh @@ -95,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