Skip to content

[pull] master from OpenAPITools:master - #809

Merged
pull[bot] merged 3 commits into
transparencies:masterfrom
OpenAPITools:master
Sep 23, 2026
Merged

pull[bot] merged 3 commits into
transparencies:masterfrom
OpenAPITools:master

Conversation

@pull

@pull pull Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

angelaki and others added 3 commits September 23, 2026 15:41
…4983)

Preserve nested property paths using recursive bracket notation and indexed arrays. Document the OpenAPI extension and cover encoding, dates, nullish values and existing query styles in the Angular sample tests.
* fix: [typescript-fetch] explode object query parameters

A query parameter whose schema is an object and whose style/explode are left at
their defaults — style: form, explode: true — must go on the wire as one
parameter per entry, keyed by the property name alone. The typescript-fetch
client bracketed it as filter[category]=books instead.

typescript-fetch/apis.mustache gated the explode branch on isContainer, which
DefaultCodegen.fromParameter only sets via updateParameterForMap, which in turn
needs ModelUtils.isMapSchema (so, additionalProperties). A bare type: object
instead goes through setTypeProperties, which sets isMap and isFreeFormObject
and leaves isContainer false. The parameter was therefore assigned whole and the
runtime's querystringSingleKey bracketed it. The branch is now keyed on isMap;
inside {{^isArray}}, isContainer implies isMap, so this is the same condition
plus free-form objects.

TypeScriptFetchClientCodegen's ExtendedCodegenParameter copy constructor copied
isExplode and style but not isDeepObject, isFormStyle, isMatrix,
isAllowEmptyValue, isSpaceDelimited or isPipeDelimited, so all six were false in
every typescript-fetch template regardless of the document. This is independent
of the template fix, and it is why fixing the template alone would have broken
deepObject parameters — they are explode: true too.

The loop body gains an `as any` cast on the indexing. It is not needed for a
declared map, but a free-form object is typed `object` and object[key] is
error TS7053 under strict, which is how most consumers compile.

* fix: [typescript-fetch] leave out a null entry of an exploded object

The runtime turned a null or undefined entry into k=null or k=undefined;
the loop now skips it, as the other ports do. Only isDeepObject is read
by the templates, so the copy constructor keeps that flag alone. The
mustache comment shrinks to one line, and the shared fixture's
description names the three combinations it covers.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix: [typescript-fetch] keep an exploded entry named __proto__

Assigning queryParameters['__proto__'] hits the Object.prototype setter
and drops the entry, while the runtime keeps such a key under deepObject
and in nested objects. The loop now defines the property instead.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* test: [typescript-fetch] say the null-skip assertion pins emitted code

The codegen test cannot run the generated client, so its comment now
says it locks the code shape; the wire behaviour was checked separately.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Apply suggestion from @cubic-dev-ai[bot]

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Esteban Gehring <esteban.gehring@gmail.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
…size (#24898)

* [swift] fix: models on a reference cycle become classes so they compile

A struct that stores itself inline - through any chain of model-typed
properties, Optional included - has infinite size: "value type cannot have
a stored property that recursively contains it", and every struct that
embeds it is infinite in turn. The generators emitted structs
unconditionally, so any self- or mutually-referencing schema produced a
client that does not compile; the only escape was useClasses=true, which
turns every model into a class.

Detect inline reference cycles in postProcessAllModels (containers break
recursion on the heap and are not edges) and render only the models on a
cycle as final classes - heap allocation provides the indirection, the
wire format is unchanged, and everything else stays a struct. In swift6 a
recursion-breaking class is @unchecked Sendable, the way readonlyProperties
classes already are, so the Sendable structs embedding it still conform.

The per-model rendering flag also carries the global useClasses value, and
the useClasses samples (urlsession, vapor, swift5 and swift6 alike)
regenerate byte-identical.

Fixes #15240

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GcwZ1arjLZNpetHz2a3TJz

* [swift] fix: allOf composition is not an inline-storage edge

Review pointed out that allOf parents are flattened into allVars rather
than stored inline, so treating the composed reference as an edge could
mark models that store nothing recursively. Real cycles introduced by the
flattening still surface through the allVars properties themselves;
oneOf/anyOf keep their edges, since those render as enums with inline
associated values.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GcwZ1arjLZNpetHz2a3TJz

* [swift5][swift6] test: allOf is not a storage edge; tidy the cycle detection

Pin bb5244e's behaviour: Base references Derived, which inherits Base
through allOf. Only Derived is on a cycle (through its flattened
`related`), so Base must stay a struct; with allOf counted as an edge it
became a class. Also shortens the Javadoc, drops a double blank line
and inlines swift5's `recursive` local.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
@pull pull Bot locked and limited conversation to collaborators Sep 23, 2026
@pull pull Bot added the ⤵️ pull label Sep 23, 2026
@pull
pull Bot merged commit 6f77724 into transparencies:master Sep 23, 2026
20 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants