Skip to content

Commit 0433cc4

Browse files
authored
chore: update openapi (#56)
Refresh the generated open api clients. Updated Go to 1.25 Replaces golangci-lint with just staticcheck.
1 parent 03c2cc1 commit 0433cc4

13 files changed

Lines changed: 6136 additions & 298 deletions

File tree

.github/workflows/test.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,12 @@ jobs:
2929
uses: github/codeql-action/init@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3.28.5
3030
with:
3131
languages: go
32-
build-mode: manual
32+
build-mode: manual # go build must be run between this step and the analysis step
3333
queries: security-extended,security-and-quality
3434
- run: go mod download
3535
- run: go build -v .
36-
- name: Run linters
37-
uses: golangci/golangci-lint-action@ec5d18412c0aeab7936cb16880d708ba2a64e1ae # v6.2.0
38-
with:
39-
version: latest
40-
skip-cache: true
36+
- run: go vet ./...
37+
- run: go tool staticcheck ./...
4138
- name: Perform CodeQL Analysis
4239
uses: github/codeql-action/analyze@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3.28.5
4340
with:

.golangci.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.licenseignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ pkg:golang/golang.org/x/sys
1313
pkg:golang/golang.org/x/text
1414
pkg:golang/golang.org/x/time
1515
pkg:golang/golang.org/x/tools
16+
# License: BSD-3-Clause AND MIT
17+
pkg:golang/honnef.co/go/tools

GNUmakefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ generate:
1010
go generate ./... && \
1111
go run github.com/google/addlicense -c "Circle Internet Group, Inc. All rights reserved." -l "apache" -v -s `find . -name "*.go" -type f -print0 | xargs -0`
1212

13+
CURL_FLAGS := --fail --retry 5 --retry-max-time 120 --retry-connrefused -s
14+
1315
.PHONY: vendor
1416
vendor:
15-
curl --fail --retry 5 --retry-max-time 120 --retry-connrefused -s https://www.quicknode.com/api-docs/v0/swagger.json -o api/quicknode/openapi.json
17+
curl $(CURL_FLAGS) https://www.quicknode.com/api-docs/v0/swagger.json | jq . > api/quicknode/openapi.json
18+
curl $(CURL_FLAGS) https://api.quicknode.com/streams/rest/openapi.json | jq . > api/streams/streams-openapi.json
19+
go generate ./api/...
1620

1721
.PHONY: validate
1822
validate:

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
This provider allows for managing [Quicknode](https://www.quicknode.com/) resources via Terraform.
44
The structure of the repository is outlined below:
5+
56
- Resources and data sources (`internal/provider/`),
67
- Examples (`examples/`)
78
- Generated documentation (`docs/`),
@@ -31,6 +32,7 @@ go install
3132
## Using the provider
3233

3334
The provider is intended to be configured:
35+
3436
```hcl
3537
terraform {
3638
required_providers {
@@ -54,18 +56,28 @@ If you wish to work on the provider, you'll first need [Go](http://www.golang.or
5456

5557
To compile the provider, run `go install`. This will build the provider and put the provider binary in the `$GOPATH/bin` directory.
5658

57-
To generate or update documentation or other generated code, run `make generate`.
59+
### Updating generated api clients
60+
61+
```sh
62+
# download the open api specs
63+
make vendor
64+
65+
# regenerate the go clients
66+
make generate
67+
```
5868

5969
### Acceptance Tests
70+
6071
In order to run the full suite of Acceptance tests, run `make testacc`, ensuring that the environment variable QUICKNODE_APIKEY is set with an apikey with at least the scope `CONSOLE_REST`.
6172

62-
*Note:* Acceptance tests create real resources, and often cost money to run.
73+
_Note:_ Acceptance tests create real resources, and often cost money to run.
6374

6475
```shell
6576
QUICKNODE_APIKEY="qn_******" make testacc
6677
```
6778

6879
### On My Machine
80+
6981
In order to use a compiled provider for a local terraform plan/apply. Configure your `~.terraformrc` as follows:
7082

7183
```hcl
@@ -77,6 +89,7 @@ provider_installation {
7789
```
7890

7991
This made be done via the following command:
92+
8093
```shell
8194
tee ~/.terraformrc <<EOT
8295
provider_installation {

api/quicknode/openapi.json

Lines changed: 2935 additions & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)