You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[TypeScript] JSON parts of a multipart request skip the serializer, so with noSerdeLayer: false their keys go out camelCase #18373
An object part of a multipart/form-data body is sent with the SDK's camelCase property names instead of the wire names. JSON request bodies are serialized correctly, so the same object goes out in different shapes depending on the content type.
Expected {"page_range":"1-2"}. The serializer for Options maps the name correctly (core.serialization.property("page_range", …)), but the generated client doesn't use it:
That code comes from the json branch of appendPropertyToFormData.ts, which always calls toJson on the raw value.
Suggested fix
When the serde layer is on, serialize the part before encoding it, e.g. toJson(serializers.Options.jsonOrThrow(request.options, { … })), as the JSON-body path does.
Also, the spec's encoding.options.contentType: application/json isn't applied: the part goes out with no Content-Type. Some servers need it to tell a JSON part from a plain-text one.
Environment: macOS 26 (arm64), Node.js 26.4, generators run locally in Docker (fern generate --local). Node.js fetch (undici) FormData.
Versions
Fern CLI version: 5.163.1
SDK Generator versions:
fernapi/fern-typescript-node-sdk 3.107.3
Workaround
noSerdeLayer: true sends wire names but gives up camelCase. Callers can also pass wire-named keys, which the types reject.
Activity