cd $DOCS/api-docs && ./getswagger.sh all -b file:///Users/jasonstirnaman/github/openapi && \
sh ./generate-api-docs.sh"
```
2. To refresh your environment with the `~/.profile` changes, enter the following command into your terminal:
```sh
source ~/.profile
```
3. To run the alias, enter the following command into your terminal:
```sh
gsd
```
`gsd` generates the local contracts in `~/github/openapi`, validates them with OATS, bundles and lints them with `@redocly/cli`, and then generates the HTML with `@redocly/cli`.
1. Go into your local `influxdata/openapi` repo directory--for example:
```sh
cd ~/github/openapi
```
2. Get the SHA for the release commit (or consult Team-Edge if you're not sure)--for example, enter the following command into your terminal to get the latest SHA for `contracts/ref/oss.yml` :
3. Copy the SHA from the output and create a git tag by running the following command, replacing **`[SEMANTIC_VERSION]`** with the OSS release (for example, `2.3.0`) and **`COMMIT_SHA`** with the SHA from step 2:
```sh
git tag influxdb-oss-v[SEMANTIC_VERSION] COMMIT_SHA
4. Enter the following commands into your terminal to push the new tag to the repo:
```sh
git push tags
```
5. Enter the following commands into your terminal to update `docs-release/influxdb-oss` branch to the OSS release commit and rebase the branch to the [latest release of InfluxDB OSS](#how-to-find-the-api-spec-used-by-an-influxdb-oss-version), replacing **`OSS_RELEASE_TAG`** with the SHA from step 3.
## Update API docs for OSS spec changes between releases
Follow these steps to update OSS API docs between version releases--for example, after revising description fields in `influxdata/openapi`.
1. Go into your local `influxdata/openapi` repo directory--for example:
```sh
cd ~/github/openapi
```
2. Enter the following commands into your terminal to checkout `docs-release/influxdb-oss` branch:
```sh
git fetch -ap
git checkout -t docs-release/influxdb-oss
```
3. Cherry-pick the commits with the updated description fields, and push the commits to the remote branch, replacing **`[COMMIT_SHAs]`** (one or more commit SHAs (space-separated))--for example:
```sh
git cherry-pick [COMMIT_SHAs]
git push -f origin docs-release/influxdb-oss
4. Go into your `docs-v2` directory and create a branch for your changes--for example:
```sh
cd ~/github/docs-v2
git fetch -ap
git checkout -b docs/api-oss origin/master
```
5. Go into `./api-docs` directory--for example:
```sh
# In your terminal, go to the `docs-v2/api-docs` directory:
cd ./api-docs
```
6. Enter the following commands into your terminal to fetch and process the contracts:
```sh
# Fetch the contracts, apply customizations, and bundle.
For example, if you've made changes to spec files and generated new contracts in your local `openapi` repo, run `getswagger.sh` to fetch and process them.
The `.redoc.yaml` configuration file sets options for the `@redocly/openapi-cli` [`lint`](https://redoc.ly/docs/cli/commands/lint/) and [`bundle`](https://redoc.ly/docs/cli/commands/bundle/) commands.
`./openapi/plugins` contains custom InfluxData Docs plugins composed of *rules* (for validating and linting) and *decorators* (for customizing). For more configuration options, see `@redocly/openapi-cli` [configuration file documentation](https://redoc.ly/docs/cli/configuration/configuration-file/).