feat: derive stream enum validators from openapi spec#77
Merged
jscaltreto merged 3 commits intoJun 29, 2026
Merged
Conversation
Refresh the QuickNode and Streams API clients from the upstream specs. The Streams spec adds several networks (including arc-mainnet), datasets, and destination types.
Generate network, dataset, destination, and region validator values from CreateStreamDto in the Streams OpenAPI spec instead of hand-maintaining them. A go:generate step (wired into make vendor) writes enums.gen.go, so the validators no longer drift from the API. StatusValidator stays hand-maintained because streams can be read back with status values the create schema does not accept.
Resolve Trivy findings from newly-disclosed CVEs in transitive deps: - golang.org/x/crypto v0.46.0 -> v0.52.0 (x/crypto/ssh advisories) - golang.org/x/net v0.48.0 -> v0.55.0 - golang.org/x/sys v0.39.0 -> v0.45.0 trivy fs now reports 0 vulnerabilities; go build and go vet pass.
nexx88
approved these changes
Jun 29, 2026
jscaltreto
pushed a commit
that referenced
this pull request
Jun 29, 2026
🤖 I have created a release *beep* *boop* --- ## [0.9.0](v0.8.1...v0.9.0) (2026-06-29) ### Features * derive stream enum validators from openapi spec ([#77](#77)) ([cb81e39](cb81e39)) ### Miscellaneous Chores * **ci:** bump GitHub Actions to Node 24 ([#75](#75)) ([5572d5c](5572d5c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
quicknode_streamresource rejected valid networks likearc-mainnetbecause its network validation list was a hand-maintained Go slice that had drifted behind the QuickNode Streams API. This PR regenerates the vendored API clients and replaces the hand-written enum validators with values generated directly from the OpenAPI spec, so they can no longer fall out of sync. It also bumps a few transitive dependencies to clear newly-disclosed CVEs flagged by the Trivy scan.Detail
make vendor): refreshed the QuickNode and Streams OpenAPI specs and their generated clients. The Streams spec adds a number of networks (includingarc-mainnet), datasets, and destination types.api/streams/gen/generate.go): ago:generateprogram that reads theCreateStreamDtoenums fromstreams-openapi.jsonand emitsapi/streams/enums.gen.go(Networks,Datasets,Destinations,Regions). Adding another enum is a one-line entry in its table.//go:generate go run gen/generate.godirective instreams.goruns alongside the client generation undermake vendor/go generate ./api/.... Invoked by explicit filename because the generator carries a//go:build ignoreconstraint.NetworkValidator,DatasetValidator,DestinationValidator, andRegionValidatornow referencestreams.*. This also corrected pre-existing drift —DestinationValidatorhad a stalefunctionvalue and was missingazure/kafka, andDatasetValidatorwas missing several values.StatusValidatorhand-maintained: the create schema only permitsactive/paused, but a stream can be read back asterminated/completed, so it intentionally does not derive from the spec.golang.org/x/cryptov0.46.0 → v0.52.0 (x/crypto/sshadvisories)golang.org/x/netv0.48.0 → v0.55.0golang.org/x/sysv0.39.0 → v0.45.0Testing
make vendorandmake generateproduce no diffs (generation is idempotent).go build ./...andgo vet ./...pass.arc-mainnetis present in the generatedNetworksand accepted byNetworkValidator.trivy fsreports 0 vulnerabilities after the dependency bump (was 21).Documentation
No documentation changes required.