Repository navigation
Conversation
|
|
|
@nrutman is attempting to deploy a commit to the Hey API Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: 61e759c The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Pull request checklistA few things need attention before this pull request can be merged:
Update the description and this check re-runs automatically. |
There was a problem hiding this comment.
Important
@hey-api/custom-client's Client/Config types were not updated alongside the new query method, producing a TS2353 error when the package is type-checked and leaving its public type out of sync with its runtime.
Reviewed changes
- Parser — adds
queryto the sharedhttpMethodslist and parsesQUERYoperations from paths and webhooks, gated to>=3.2.0(packages/shared/src/openApi/3.1.x/parser/{index,webhook}.ts). - IR & spec types — adds
querytoIRPathItemObjectandOpenAPIV3.PathItemObject, the'3.2.0'version literal, and theirPatternsregexes. - Clients — adds
query: makeMethodFn('QUERY')(and the SSE variant) across the bundled Angular/Axios/fetch/ky/next/Nuxt/ofetch clients and@hey-api/custom-client. - Plugins — maps
queryto thequerykind indefaultGetKindand generatesclient.query(...)SDK calls. - Tests/snapshots — new
3.2.x.test.tsplusspecs/3.2.x/http-query.yaml, parser version-boundary unit tests, a fetch runtime body test, and regenerated snapshots.
ℹ️ Other method enumerations still omit query
Two hard-coded HTTP-method lists were not extended, so QUERY operations are invisible to those code paths even though the shared httpMethods now includes them.
Technical details
# Hard-coded method lists missing `query`
## Affected sites
- `packages/shared/src/openApi/shared/utils/patch.ts:62` and `:166` — the bulk `patch.operations` callback iterates `['get','put','post','delete','options','head','patch','trace']`; a `QUERY` operation is silently skipped, so user patch functions never see it (the record-based branch at `:79`/`:183` does work via `key.split(' ')`).
- `packages/json-schema-ref-parser/src/index.ts:551` — `HTTP_METHODS` set omits `query`, so when merging multi-file specs a `QUERY` method conflict on the same path is not detected and the operation can be overwritten instead of namespaced.
## Required outcome
- `query` should be handled consistently in both utilities, matching the new shared `httpMethods` list.
## Suggested approach (optional)
- Derive these lists from `httpMethods` (uppercasing for the parser set) rather than duplicating literals to avoid the same drift later.ℹ️ Nitpicks
packages/openapi-ts-tests/main/test/3.2.x.test.tsreimplements a simplifiedcreateConfigthat diverges from the helper in3.0.x.test.ts/3.1.x.test.ts(no arrayinput/outputhandling, nonameConflictResolverpassthrough), and only one scenario is covered. Worth aligning before the 3.2 suite grows.packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/client.ts:150—method: opts.method as anyis spread after...asyncDataOptions, so it now always wins over amethodsupplied throughasyncDataOptions(previously the latter won). This is likely intentional forQUERYtyping, but it is a behavior change for directrequest()calls whereopts.methodis undefined.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4456 +/- ##
==========================================
+ Coverage 40.56% 41.16% +0.59%
==========================================
Files 827 827
Lines 25727 25762 +35
Branches 7687 7687
==========================================
+ Hits 10436 10604 +168
+ Misses 12319 12231 -88
+ Partials 2972 2927 -45
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
@hey-api/codegen-cli
@hey-api/codegen-core
@hey-api/json-schema-ref-parser
@hey-api/nuxt
@hey-api/openapi-python
@hey-api/openapi-ts
@hey-api/shared
@hey-api/spec-types
@hey-api/types
@hey-api/vite-plugin
commit: |

Summary
QUERYparsing for paths and webhooks.client.query()calls across supported clients and query plugins.Review map: 23.7% hand-authored / 76.3% generated
Implementation
packages/custom-client/src/client.tspackages/custom-client/src/core/types.tspackages/json-schema-ref-parser/src/index.tspackages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/client.tspackages/openapi-ts/src/plugins/@hey-api/client-axios/bundle/client.tspackages/openapi-ts/src/plugins/@hey-api/client-core/bundle/types.tspackages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/client.tspackages/openapi-ts/src/plugins/@hey-api/client-ky/bundle/client.tspackages/openapi-ts/src/plugins/@hey-api/client-next/bundle/client.tspackages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/client.tspackages/openapi-ts/src/plugins/@hey-api/client-ofetch/bundle/client.tspackages/openapi-ts/src/plugins/msw/shared/handler.tspackages/openapi-ts/src/symbols/msw.tspackages/shared/src/ir/graph.tspackages/shared/src/ir/types.tspackages/shared/src/openApi/2.0.x/parser/filter.tspackages/shared/src/openApi/2.0.x/parser/index.tspackages/shared/src/openApi/2.0.x/parser/validate.tspackages/shared/src/openApi/3.0.x/parser/filter.tspackages/shared/src/openApi/3.0.x/parser/index.tspackages/shared/src/openApi/3.0.x/parser/validate.tspackages/shared/src/openApi/3.1.x/parser/filter.tspackages/shared/src/openApi/3.1.x/parser/index.tspackages/shared/src/openApi/3.1.x/parser/validate.tspackages/shared/src/openApi/3.1.x/parser/webhook.tspackages/shared/src/openApi/shared/graph/meta.tspackages/shared/src/openApi/shared/utils/filter.tspackages/shared/src/openApi/shared/utils/operation.tspackages/shared/src/openApi/shared/utils/patch.tspackages/shared/src/plugins/shared/utils/instance.tspackages/spec-types/src/openapi/v3-1/spec.tsTests
packages/custom-client/src/__tests__/client.test.tspackages/json-schema-ref-parser/src/__tests__/bundle.test.tspackages/openapi-ts-tests/main/test/3.2.x.test.tspackages/openapi-ts-tests/msw/v2/test/3.2.x.test.tspackages/openapi-ts/src/plugins/@hey-api/client-fetch/__tests__/client.test.tspackages/shared/src/ir/__tests__/graph.test.tspackages/shared/src/openApi/3.1.x/parser/__tests__/filter.test.tspackages/shared/src/openApi/3.1.x/parser/__tests__/index.test.tspackages/shared/src/openApi/3.1.x/parser/__tests__/validate.test.tspackages/shared/src/openApi/shared/utils/__tests__/filter.test.tspackages/shared/src/openApi/shared/utils/__tests__/graph.test.tspackages/shared/src/openApi/shared/utils/__tests__/patch.test.tsFixtures
packages/openapi-ts-tests/main/test/custom/client/client.tspackages/openapi-ts-tests/main/test/custom/client/core/types.tsspecs/3.2.x/http-query.yamlMetadata
.changeset/fuzzy-bears-query.mdLinked issues
Related to: #2660
Testing
pnpm lintpnpm typecheckpnpm test -- --runpnpm examples:update(idempotence verified)Certification