Skip to content

Repository files navigation

oxide.ts

This repo contains a TypeScript OpenAPI client generator and a copy of the client it generates from Oxide's OpenAPI schema. The generator is built specifically for use with schemas generated by Dropshot. It has not been tested on any other schemas and is unlikely to handle them well.

Package Description
@oxide/openapi-gen-ts TypeScript OpenAPI client generator
@oxide/api The client generated for the Omicron commit specified in OMICRON_VERSION

Using the API client

See the README for the @oxide/api package.

Releases

To publish a release of either package, bump its version and land the change on main:

cd oxide-api  # or oxide-openapi-gen-ts
npm version patch --no-git-tag-version   # or minor/major — bumps package.json

On every push to main, CI checks whether each package's package.json version is already on the registry. If either needs publishing, the Release workflow pauses in a "waiting for review" state. A required reviewer must approve the release environment deployment from the workflow run before the publish proceeds. Publishing uses npm trusted publishing (OIDC), so no tokens are involved, and the provenance attestation on the registry records which commit each release was built from.

To publish a canary build of a PR, go to the Release workflow, click "Run workflow", choose a package, and enter the PR number. It publishes the PR's head as <version>-canary.<pr>.<sha> under the canary dist-tag and comments the version on the PR. The dispatched workflow requires the same release environment approval before publishing.

Contributing

We prefer to keep the generator as simple as possible and narrowly scoped to our use case, so we can't spend much time reviewing PRs intended to expand functionality beyond what we need. If you like this generator and want to use it on your own specs, we recommend forking.

About

TypeScript client for the Oxide API

Resources

Stars

Watchers

Forks

Used by

Contributors

Languages