Skip to content

Commit 69d39da

Browse files
committed
feat: add multichain support to endpoint resource
Adds an optional `multichain` boolean attribute to the `quicknode_endpoint` resource. Wires the QuickNode Admin API enable_multichain and disable_multichain endpoints into Create/Update, and reads the current state back via the `is_multichain` field on the show endpoint response so drift is detected. Side effects from `make vendor`: - Refresh of api/quicknode/openapi.json and the generated client, which adds `is_multichain` (plus other new fields like `name`, `is_dedicated`, `is_flat_rate`, `status`) to the endpoint types. - Refresh of api/streams/streams-openapi.json and the generated client. - Local rename of a duplicate `deleteTag` operationId (two different paths upstream share the same id) to unblock code generation. Tests: - Unit tests for the new setMultichain helper covering enable/disable success, transport errors, and non-200 responses.
1 parent ceb9325 commit 69d39da

10 files changed

Lines changed: 4174 additions & 428 deletions

File tree

GNUmakefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@ CURL_FLAGS := --fail --retry 5 --retry-max-time 120 --retry-connrefused -s
1414

1515
.PHONY: vendor
1616
vendor:
17-
curl $(CURL_FLAGS) https://www.quicknode.com/api-docs/v0/swagger.json | jq . > api/quicknode/openapi.json
17+
# The upstream QuickNode spec reuses the `deleteTag` operationId for two
18+
# distinct paths (`/v0/endpoints/{id}/tags/{tag_id}` and
19+
# `/v0/endpoints/tags/{id}`), which trips up oapi-codegen. Rename the
20+
# account-level op locally to `deleteAccountTag` until QuickNode fixes
21+
# this upstream; remove the jq step once they do.
22+
curl $(CURL_FLAGS) https://www.quicknode.com/api-docs/v0/swagger.json \
23+
| jq '.paths."/v0/endpoints/tags/{id}".delete.operationId = "deleteAccountTag"' \
24+
> api/quicknode/openapi.json
1825
curl $(CURL_FLAGS) https://api.quicknode.com/streams/rest/openapi.json | jq . > api/streams/streams-openapi.json
1926
go generate ./api/...
2027

0 commit comments

Comments
 (0)