Skip to content

Commit

Permalink
update to openapi with multi vi support (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmenglund authored Aug 21, 2023
1 parent 2cae2be commit cb01184
Show file tree
Hide file tree
Showing 66 changed files with 3,196 additions and 42 deletions.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,19 @@ if err != nil {
fmt.Printf("%+v\n", res)
```

## Updating the OpenAPI specification

If the OpenAPI specification has changed, you need to regenerate the OpenAPI client

```
# bump the minor version
vi version.go
# generate a new client
./generate.sh
# record new VCR cassettes
VCR_MODE=record go test ./...
```

## Testing

There are a number of testable examples which require an API key, i.e. set the `ROCKSET_APIKEY` and `ROCKSET_APISERVER`
Expand All @@ -60,9 +73,12 @@ go test -v -timeout 30m ./...

### Go VCR

Some tests use [Go VCR](https://github.com/seborama/govcr), and they will use a cassette (recorded response) by default,
Most tests use [Go VCR](https://github.com/seborama/govcr), and they will use a cassette (recorded response) by default,
so if you want to re-record a cassette, set the environment variable `VCR_MODE` to `record`.

The VCR tracks ignore the patch version of the client version, so when the OpenAPI spec is updated you have to
re-record the VCR cassettes.

### Code Coverage

```
Expand Down
2 changes: 1 addition & 1 deletion openapi/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit cb01184

Please sign in to comment.