Skip to content

feat(storage): OpenAPI codegen tool + generated Storage HTTP client - #1099

Draft
grdsdev wants to merge 75 commits into
mainfrom
claude/sad-poincare-c48d88
Draft

feat(storage): OpenAPI codegen tool + generated Storage HTTP client#1099
grdsdev wants to merge 75 commits into
mainfrom
claude/sad-poincare-c48d88

Conversation

@grdsdev

@grdsdev grdsdev commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a generic OpenAPI-to-Swift code generator (tools/openapi-codegen, standalone SPM package, depends on OpenAPIKit30 and swift-argument-parser) that parses an OpenAPI 3.0.3 document into an internal IR and emits Swift models + a client targeting a new zero-dependency HTTPRuntime (copied from a prior spike into Sources/HTTPRuntime).
  • Commits Storage's OpenAPI spec (openapi/storage.json, fixed for SDK generation by supabase/storage#1215) and the client generated from it (Sources/StorageOpenAPI/) — not yet wired into the public Storage API. This proves the generator works end-to-end against a real spec; reconciling naming/shape with the hand-written StorageFileApi/StorageBucketApi and actually adopting the generated client is future work.
  • Design doc: docs/superpowers/specs/2026-07-08-storage-openapi-codegen-design.md. Implementation plan: docs/superpowers/plans/2026-07-08-storage-openapi-codegen.md.

The original plan had 15 tasks. Running the generator against Storage's real spec repeatedly surfaced constructs the plan didn't anticipate — each was checked with the user before extending the generator's scope. That produced follow-up tasks hoisting inline enums and inline objects (in schema properties, parameters, request/response bodies, and array items) into named Swift types, supporting oneOf/anyOf unions as tagged enums with hand-rolled Codable, treating typeless "fragment" schemas as freeform, skipping operations without an operationId, and fixing two non-determinism bugs plus a naming bug and a missing Xcode scheme entry along the way. The generator now produces the full real spec deterministically: 71 schemas, 60 operations.

A final whole-branch review (and further follow-ups) found and fixed: a third non-deterministic iteration (multipart fields), a broken emission path for array-typed query parameters, an emitter crash for union-typed parameters (now rejected at parse time — no well-defined query/header wire representation), consolidated the inline-object hoisting logic that had been hand-copied across four call sites into one shared helper, and replaced the CLI's hand-rolled argument parsing with swift-argument-parser.

Test plan

  • tools/openapi-codegen's own test suite: 51 tests, 10 suites, all passing
  • Full xcodebuild test suite for the main package (PLATFORM=IOS XCODEBUILD_ARGUMENT=test ./scripts/xcodebuild.sh), confirmed HTTPRuntimeTests/StorageOpenAPITests actually execute (not just present in Package.swift), zero regressions in Auth/Functions/Helpers/PostgREST/Realtime/Storage/Supabase
  • Generation is reproducible: regenerating from openapi/storage.json with the committed CLI produces byte-identical output to what's committed
  • Sources/StorageFileApi.swift/StorageBucketApi.swift/Types.swift/SupabaseStorage.swift confirmed untouched — the generated client is additive only
  • Independent per-task code review (32 tasks) plus a final whole-branch review — verdict: ready to merge with fixes, all fixes applied
  • Follow-up filed (not blocking this PR): close the remaining stringConversionExpression gap for arrays of hoisted (non-scalar) types in parameter position — not exercised by Storage's current spec

@coveralls

coveralls commented Jul 9, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 30479285183

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage decreased (-1.7%) to 82.12%

Details

  • Coverage decreased (-1.7%) from the base build.
  • Patch coverage: 33 uncovered changes across 2 files (0 of 33 lines covered, 0.0%).
  • 350 coverage regressions across 5 files.

Uncovered Changes

File Changed Covered %
Sources/HTTPRuntime/HTTPError.swift 29 0 0.0%
Sources/Storage/Generated/Client.swift 4 0 0.0%

Coverage Regressions

350 previously-covered lines in 5 files lost coverage.

File Lines Losing Coverage Coverage
Sources/RealtimeV2/RealtimeChannelV2.swift 144 67.65%
Sources/RealtimeV2/WebSocket/URLSessionWebSocket.swift 96 63.98%
Sources/RealtimeV2/RealtimeClientV2.swift 67 88.1%
Sources/RealtimeV2/ChannelStateManager.swift 22 90.42%
Sources/Auth/Internal/Keychain.swift 21 25.55%

Coverage Stats

Coverage Status
Relevant Lines: 10559
Covered Lines: 8671
Line Coverage: 82.12%
Coverage Strength: 37.71 hits per line

💛 - Coveralls

grdsdev added 7 commits July 11, 2026 07:36
…e deleted SSE parser after the package-scoping edit

The manual public->package access-control pass left HTTPRuntime non-compiling:
checkStatus still referenced HTTPResponse's now-removed bare status/isSuccess
(now only on .head), MultipartFormData's new builder API members defaulted to
internal instead of package, and ServerSentEvents.swift was deleted outright
rather than rescoped, breaking SSE stream parsing entirely.
Follow-up to the HTTPRuntime target isolation: registers the test
target in the shared Xcode scheme, adds its spell-check terms, and
updates Package.resolved to drop dependencies no longer pulled in by
this trimmed-down package graph.
…ase, add addHeader

- HTTPTransport.send/stream now throw typed HTTPError instead of any Error;
  URLSessionTransport already only ever threw HTTPError.transport, so this
  just tightens the contract. Dropped the redundant `throws` on the private
  makeURLRequest helper, which never actually threw.
- Removed HTTPBody.multipart: callers now build the multipart body themselves
  via MultipartFormData.buildToTempFile(), set Content-Type, and pass .file.
  Keeps HTTPTransport from needing to know about multipart assembly.
- Added HTTPRequestBuilder.addHeader(_:value:), which merges into an existing
  header (joined with "; ") instead of replacing it, for repeated directives
  like Prefer. Both setHeader and addHeader resolve the target key
  case-insensitively so differently-cased calls merge into one header
  instead of creating duplicates.
grdsdev added 15 commits July 11, 2026 09:42
Supabase's own clients don't need it; downstream consumers can parse
the raw streamed chunks themselves if they want SSE framing.
…sed doc references

- checkStatus now requires a catch-all APIError type instead of falling
  back to a bare unexpectedStatus(status:body:) case, and reports decode
  failures as unexpectedResponse(response:underlyingError:) with the full
  response attached.
- Commented out the still-unused HTTPError.encoding case.
- Dropped doc comments referencing the (now removed) OpenAPI codegen tool.
…uild

- TransferProgress/ProgressHandler were left `public` when the rest of
  HTTPRuntime was scoped down to `package`; the capability-matrix CI
  check flagged them as new, unregistered public API. Scope them to
  `package` like everything else in this target.
- FoundationNetworking (swift-corelibs-foundation on Linux) has no
  async byte-streaming API (`bytes(for:)`/`AsyncBytes`), so
  URLSessionTransport.stream() failed to compile on Linux. Branch on
  `canImport(FoundationNetworking)`: Linux buffers the full response
  via `data(for:)` and yields it as a single chunk instead of
  streaming incrementally; Apple platforms keep the existing
  incremental byte-stream implementation.
…e and dictionary

Adds HTTPRuntimeTestHelpersTests to the shared Xcode scheme in alphabetical order between HelpersTests and HTTPRuntimeTests. Includes dictionary.txt entries for Xcode-related terms and formatting fixes to HTTPRuntimeTestHelpers source files.
grdsdev added 4 commits July 27, 2026 15:48
…rget-085a05

# Conflicts:
#	Package.resolved
#	Package.swift
…r directives

addHeader joined repeated directives with "; ", conflicting with this repo's
Prefer convention (HTTPFields.appendOrUpdate, PostgrestQueryBuilder/
PostgrestTransformBuilder all use ","), which would make two addHeader("Prefer", ...)
calls read as one directive-with-parameter instead of two. Also replace an
existing directive sharing the same key prefix instead of duplicating it,
mirroring appendOrUpdate.

Addresses review feedback from spydon on #1121.
docs/superpowers/ was already gitignored (deduped a redundant earlier
entry too) but these two files were tracked before the rule existed.
grdsdev added 9 commits July 27, 2026 16:03
Consolidates the inline-object-with-properties hoisting check that was
hand-copied at three call sites (parseObjectProperties, parseRequestBody,
parseResponseBody) into a single hoistInlineObjectIfPresent helper,
matching the pattern already used for hoistUnionIfPresent and
hoistArrayOfObjectIfPresent. parseParameter is intentionally left
untouched since it doesn't support inline-object hoisting.
ArgumentParser's default kebab-casing of "OpenAPICodegen" produces
"open-api-codegen", which doesn't match the actual executable name and
would mislead anyone who copies the --help/error text verbatim.
…ipartFormData API

tools/openapi-codegen's emitter still hardcoded `public` on every generated
declaration and emitted the old MultipartFormData.Part/.append API, both of
which no longer compile against HTTPRuntime's package-scoped types and
rewritten builder-style MultipartFormData. Threads a new AccessLevel enum
(default .internal) through every emitter helper and adds a --access-level
CLI option; multipart request bodies now build via the .addFile/.addText
fluent chain. Regenerates Sources/StorageOpenAPI with the new internal
default.
@grdsdev
grdsdev force-pushed the claude/sad-poincare-c48d88 branch from 2bab4f7 to ae7aa4e Compare July 27, 2026 19:28
@grdsdev
grdsdev changed the base branch from main to claude/httpruntime-target-085a05 July 27, 2026 19:28
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ce490867-ae12-49c7-aa5b-9b934f738fcb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Capability matrix drift detected

The following capabilities are marked implemented in swift but have no registered symbols to verify:

  • auth.passkey.register_passkey (no symbols list — cannot confirm implementation exists)
  • auth.passkey.sign_in_with_passkey (no symbols list — cannot confirm implementation exists)
  • client.authentication_integration.third_party_auth (no symbols list — cannot confirm implementation exists)
  • client.authentication_integration.cross_client_token_sync (no symbols list — cannot confirm implementation exists)
  • client.authentication_integration.oauth_flow_type (no symbols list — cannot confirm implementation exists)
  • client.authentication_integration.session_url_detection (no symbols list — cannot confirm implementation exists)
  • client.session_management.custom_storage (no symbols list — cannot confirm implementation exists)
  • client.session_management.persist_session (no symbols list — cannot confirm implementation exists)
  • client.request_configuration.global_headers (no symbols list — cannot confirm implementation exists)
  • client.observability.trace_propagation (no symbols list — cannot confirm implementation exists)
  • database.query.from_table (no symbols list — cannot confirm implementation exists)
  • database.query.select (no symbols list — cannot confirm implementation exists)
  • database.query.schema_selection (no symbols list — cannot confirm implementation exists)
  • database.query.rpc (no symbols list — cannot confirm implementation exists)
  • database.mutate.insert (no symbols list — cannot confirm implementation exists)
  • database.mutate.update (no symbols list — cannot confirm implementation exists)
  • database.mutate.upsert (no symbols list — cannot confirm implementation exists)
  • database.mutate.delete (no symbols list — cannot confirm implementation exists)
  • database.mutate.select_after_mutation (no symbols list — cannot confirm implementation exists)
  • database.using_filters.eq (no symbols list — cannot confirm implementation exists)
  • database.using_filters.neq (no symbols list — cannot confirm implementation exists)
  • database.using_filters.gt (no symbols list — cannot confirm implementation exists)
  • database.using_filters.gte (no symbols list — cannot confirm implementation exists)
  • database.using_filters.lt (no symbols list — cannot confirm implementation exists)
  • database.using_filters.lte (no symbols list — cannot confirm implementation exists)
  • database.using_filters.like (no symbols list — cannot confirm implementation exists)
  • database.using_filters.ilike (no symbols list — cannot confirm implementation exists)
  • database.using_filters.is (no symbols list — cannot confirm implementation exists)
  • database.using_filters.in (no symbols list — cannot confirm implementation exists)
  • database.using_filters.contains (no symbols list — cannot confirm implementation exists)
  • database.using_filters.contained_by (no symbols list — cannot confirm implementation exists)
  • database.using_filters.range_gt (no symbols list — cannot confirm implementation exists)
  • database.using_filters.range_gte (no symbols list — cannot confirm implementation exists)
  • database.using_filters.range_lt (no symbols list — cannot confirm implementation exists)
  • database.using_filters.range_lte (no symbols list — cannot confirm implementation exists)
  • database.using_filters.range_adjacent (no symbols list — cannot confirm implementation exists)
  • database.using_filters.overlaps (no symbols list — cannot confirm implementation exists)
  • database.using_filters.text_search (no symbols list — cannot confirm implementation exists)
  • database.using_filters.match (no symbols list — cannot confirm implementation exists)
  • database.using_filters.not (no symbols list — cannot confirm implementation exists)
  • database.using_filters.or (no symbols list — cannot confirm implementation exists)
  • database.using_filters.raw (no symbols list — cannot confirm implementation exists)
  • database.using_filters.regex (no symbols list — cannot confirm implementation exists)
  • database.using_filters.regex_icase (no symbols list — cannot confirm implementation exists)
  • database.using_filters.is_distinct (no symbols list — cannot confirm implementation exists)
  • database.using_filters.like_all (no symbols list — cannot confirm implementation exists)
  • database.using_filters.like_any (no symbols list — cannot confirm implementation exists)
  • database.using_filters.ilike_all (no symbols list — cannot confirm implementation exists)
  • database.using_filters.ilike_any (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.order (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.limit (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.range (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.single_row (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.strip_nulls (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.format_csv (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.format_geojson (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.max_affected_rows (no symbols list — cannot confirm implementation exists)
  • database.using_modifiers.request_cancellation (no symbols list — cannot confirm implementation exists)
  • database.configuration.auto_retry (no symbols list — cannot confirm implementation exists)
  • functions.invocation.invoke (no symbols list — cannot confirm implementation exists)
  • functions.invocation.set_auth_token (no symbols list — cannot confirm implementation exists)
  • functions.invocation.method_override (no symbols list — cannot confirm implementation exists)
  • functions.invocation.streaming_response (no symbols list — cannot confirm implementation exists)
  • functions.invocation.request_cancellation (no symbols list — cannot confirm implementation exists)
  • realtime.client.connect (no symbols list — cannot confirm implementation exists)
  • realtime.client.disconnect (no symbols list — cannot confirm implementation exists)
  • realtime.client.get_channels (no symbols list — cannot confirm implementation exists)
  • realtime.client.remove_channel (no symbols list — cannot confirm implementation exists)
  • realtime.client.remove_all_channels (no symbols list — cannot confirm implementation exists)
  • realtime.client.connection_state (no symbols list — cannot confirm implementation exists)
  • realtime.client.listen_heartbeats (no symbols list — cannot confirm implementation exists)
  • realtime.client.set_auth_token (no symbols list — cannot confirm implementation exists)
  • realtime.client.channel (no symbols list — cannot confirm implementation exists)
  • realtime.channel.subscribe (no symbols list — cannot confirm implementation exists)
  • realtime.channel.unsubscribe (no symbols list — cannot confirm implementation exists)
  • realtime.channel.send (no symbols list — cannot confirm implementation exists)
  • realtime.channel.broadcast_http (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.postgres_changes (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.subscribe_presence (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.private_channel (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.broadcast_self (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.broadcast_ack (no symbols list — cannot confirm implementation exists)
  • realtime.subscriptions.broadcast_replay (no symbols list — cannot confirm implementation exists)
  • realtime.presence.track (no symbols list — cannot confirm implementation exists)
  • realtime.presence.untrack (no symbols list — cannot confirm implementation exists)
  • realtime.presence.presence_key (no symbols list — cannot confirm implementation exists)
  • realtime.configuration.custom_websocket_transport (no symbols list — cannot confirm implementation exists)
  • realtime.configuration.reconnect_backoff (no symbols list — cannot confirm implementation exists)
  • realtime.configuration.heartbeat_interval (no symbols list — cannot confirm implementation exists)
  • realtime.configuration.access_token_callback (no symbols list — cannot confirm implementation exists)
  • realtime.configuration.deferred_disconnect (no symbols list — cannot confirm implementation exists)
  • realtime.configuration.custom_logger (no symbols list — cannot confirm implementation exists)
  • realtime.configuration.binary_protocol (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.get_bucket (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.list_file_buckets (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.update_bucket (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.delete_file_bucket (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.empty_bucket (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.access_bucket (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.upload (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.download (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.move (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.copy (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.remove (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.create_signed_url (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.create_signed_urls (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.create_signed_upload_url (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.upload_with_signed_url (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.update_file (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.file_exists (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.file_info (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.list_files_paginated (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.copy_cross_bucket (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.move_cross_bucket (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.upload_with_metadata (no symbols list — cannot confirm implementation exists)
  • storage.file_buckets.url_cache_nonce (no symbols list — cannot confirm implementation exists)

These may have been renamed, removed, or never registered. Please update the capability matrix.
See: https://github.com/supabase/sdk/blob/main/docs/capability-matrix.md

Generated clients call checkStatus(errorTypes:) with no catchAll for
operations whose spec declares no error schema at all. Falls back to
.unexpectedResponse instead of requiring every call site to supply a
catch-all error type.
@grdsdev
grdsdev force-pushed the claude/sad-poincare-c48d88 branch from ae7aa4e to df98ec1 Compare July 27, 2026 19:47
grdsdev added 2 commits July 27, 2026 19:56
…dAPI

Adds scripts/generate-openapi-clients.sh to regenerate Sources/<Module>/Generated
from openapi/*.json via tools/openapi-codegen. Generated declarations now nest
under a per-module enum namespace (e.g. StorageBackendAPI) so schema-derived
type names can never collide with hand-written public types, replacing the
now-removed Sources/StorageOpenAPI target. Also fixes an emitted `var builder`
never-mutated warning and makes the emitter indent nested output itself instead
of relying on swift-format.
grdsdev added a commit that referenced this pull request Jul 28, 2026
Adds storage.vectors.{createBucket,getBucket,listBuckets,deleteBucket}
for Supabase Storage's alpha "vector buckets" feature, mirroring
supabase-js's supabase.storage.vectors client. Indexes and vector data
operations (put/get/query/delete vectors) are out of scope for this
pass.

The vector bucket paths/schemas are merged into openapi/storage.json
from the real docs:export output of supabase/storage's
claude/reverent-ramanujan-32755f branch (supabase/storage#1215), which
adds response schemas for these 4 endpoints (previously only errors
were documented). Sources/Storage/Generated is regenerated from that
spec via tools/openapi-codegen.

Since the generated StorageBackendAPI.Client and its models are
module-internal by convention, a new StorageVectorsClient wraps it with
a public API: VectorBucket/ListVectorBucketsResponse replace the
internal generated schemas, and the internal ErrorSchema is translated
to the existing public StorageError. StorageSessionTransport bridges
StorageClientConfiguration's StorageHTTPSession onto HTTPRuntime's
HTTPTransport, so the generated client goes through the same session
(auth headers, test stubbing) as the rest of Storage.

The whole surface is gated behind @_spi(Experimental), matching the
precedent set by Auth's WebAuthn support, since this is an alpha
feature that may change in a breaking way before general availability.

Built on #1121/#1099 (the isolated HTTPRuntime target and
openapi-codegen tool) rather than main.
Base automatically changed from claude/httpruntime-target-085a05 to main July 28, 2026 10:16
grdsdev added 10 commits July 28, 2026 07:23
…48d88

# Conflicts:
#	Sources/HTTPRuntime/HTTPError.swift
#	Sources/HTTPRuntime/HTTPMethod.swift
#	Sources/HTTPRuntime/MultipartFormData.swift
#	Sources/HTTPRuntime/URLSessionTransport.swift
#	dictionary.txt
Adds openapi-codegen-test and openapi-codegen-regenerate-check to ci-success,
skipped on PRs that don't touch tools/openapi-codegen, openapi/, or the
generation script.
docs/superpowers/ is gitignored but these two predate the rule.
Was a single line; formatting it makes spec changes reviewable in PR diffs.
No content change — regenerating the Storage client from this file produces
byte-identical output.
Nothing in the codebase (generated or hand-written) ever passed it, so
errorTypes lookups always fell through to unexpectedResponse regardless.
Updates openapi/storage.json: adds 5XX error responses across endpoints,
an error `code` field, vectorBucketSchema/getVectorBucketResponse, and -
notably - the multipart/form-data requestBody for object upload endpoints,
which the spec previously omitted entirely.

That last change exercises the codegen's multipart code path for the first
time, surfacing two bugs in SwiftEmitter fixed here: generated code
referenced the bare `MultipartFormData` name, which a target module can
shadow with its own same-named type (Storage already has one, a legacy
Alamofire-derived implementation) - qualified as HTTPRuntime.MultipartFormData.
Also HTTPBody dropped its .multipart case upstream; build the body to a
temp file and send it as .file(...), matching HTTPRuntime's current
streaming-upload API.

Regenerated Sources/Storage/Generated/{Models,Client}.swift accordingly.
The Storage backend now emits specs declaring newer OpenAPI versions
whose schemas use JSON Schema 2020-12 nullable idioms (`type: [X,
"null"]`, `anyOf: [X, {type: "null"}]`) that the 3.0-only OpenAPIKit30
parser can't decode at all.

Migrate openapi-codegen from OpenAPIKit30 to OpenAPIKit's unsuffixed
3.1/3.2 module (same vendored dependency, different product). Type
arrays and null-branch unions now resolve to plain nullable properties
natively; add parser handling so a null-collapsed anyOf/oneOf isn't
mistaken for a real tagged union. The remaining pre-decode
normalization step only drops anyOf/oneOf-of-required validation
constructs that OpenAPIKit has no representation for regardless of
spec version.

Sync openapi/storage.json from the backend's 3.2 export and
regenerate. The export doesn't include operationIds or named
component schemas yet, so the generated client is temporarily reduced
to 2 schemas and no operations — a backend follow-up will restore
full coverage.
…s OpenAPI spec

Add openapi/functions.json (from supabase/edge-functions-ingress#459, bumped
to 3.2) and wire Functions into the codegen module list. Also teach the
codegen to model a `*/*` request body as raw Data/Content-Type instead of
silently dropping it in favor of application/json, and fix HTTPError usage
in the streaming-response error path (unexpectedStatus never existed).
…ck stream status

- Invoke accepts GET/POST/PUT/PATCH/DELETE, not just POST; add sibling
  operations (invokeFunctionGet/Put/Patch/Delete) alongside invokeFunction.
- Expose the binary request body as HTTPBody (not Data) so callers can pass
  .file(url) to stream an upload without buffering it into memory.
- Route streaming responses through HTTPResponseStream.checkStatus so a
  failing stream decodes typed API errors the same way buffered responses do,
  instead of only ever surfacing a generic unexpectedResponse.
…I spec

Keep FunctionsClient hand-written, on its existing Helpers-based transport.
The codegen/runtime capabilities added along the way (HTTPBody request
bodies, multi-method operations, HTTPResponseStream.checkStatus) stay, since
they're general tool/runtime features, not specific to Functions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants