# keyapis

Client for keyapis swagger.

```sh
# download spec json from localhost
wget -qO- http://localhost:5000/gzip/spec/json.tar.gz | tar xvz -C . --strip-components=1
# download spec json from last public version
wget -qO- https://openapi-key.deploy.rtkit.dev/gzip/spec/json.tar.gz | tar xvz -C . --strip-components=1


# download openapi from localhost
wget -qO- http://localhost:5000/gzip/spec/openapi.tar.gz | tar xvz -C . --strip-components=1
# download openapi from last public version
mkdir -p ./spec/openapi && wget -qO- https://openapi-key.deploy.rtkit.dev/gzip/spec/openapi.tar.gz | tar xvz -C ./spec/openapi --strip-components=1

# install deps
npm install

# build development build
npm run start

# build production build
npm run build

# move latest local build to example(for debug)
rm -rf ../../examples/ts-gateway/node_modules/@key/keyapis/dist && \
cp -R dist ../../examples/ts-gateway/node_modules/@key/keyapis/dist
```

launch in Docker

```sh
cd codegen/ts-gateway
docker compose up --build ts-client
```

