5.0.6
(fix): Fix construct_type to resolve ForwardRef annotations in nested model fields
and use strict Literal discriminant matching for undiscriminated unions.
Under Pydantic v2 with from __future__ import annotations, field annotations
like List["Block"] remain as list[ForwardRef('Block')] even after
model_rebuild. construct_type now resolves these ForwardRefs via the host
model’s module, ensuring nested data is recursively constructed into proper model
instances instead of staying as raw dicts.
Additionally, undiscriminated union resolution now requires Literal-typed
discriminant fields to be present AND matching before accepting a candidate type.
This prevents models with all-optional fields (e.g. FigureDetails) from greedily
matching inputs that belong to a different variant or to a plain-dict fallback.
5.0.5
(fix): Add enum handling to construct_type() to prevent Pydantic serialization warnings
when enum values pass through untyped model construction paths.
5.0.4
(fix): Fix optional complex-type parameters in multipart file upload requests being
sent as "null" instead of being omitted. When an optional body property
(e.g., Optional[List[str]], Optional[Any]) defaults to OMIT,
json.dumps(jsonable_encoder(OMIT)) was evaluating to the string "null",
destroying the OMIT sentinel before remove_omit_from_dict could strip it.
Optional non-primitive body properties now emit a ternary guard
(json.dumps(...) if prop is not OMIT else OMIT) so that the OMIT sentinel
is preserved and correctly removed from the request data.
5.0.3
(fix): Skip Docker container management in generated tests/conftest.py when the
WIREMOCK_URL environment variable is already set. This allows wire tests to
run in CI/CD pipelines that provide an external WireMock sidecar container
without requiring Docker-in-Docker support.
5.0.2
(fix): Add docstring emission for unknown/any type alias definitions. When a type alias
resolves to typing.Any and has a description in the API definition, the generated
Python code now includes the docstring below the type alias declaration.
5.0.1
(chore): Upgrade pytest-asyncio dev dependency from ^0.23.5 to ^1.0.0 in generated
pyproject.toml. This eliminates deprecation warnings about asyncio.iscoroutinefunction,
asyncio.get_event_loop_policy, and asyncio.set_event_loop_policy when running tests
on Python 3.14+.
5.0.0
(feat): Raise the default minimum Python version from ^3.8 to ^3.10 in generated
pyproject.toml. This allows the dependency resolver to pick Pydantic 2.11+ and
pydantic-core 2.33+, which ship pre-built wheels for Python 3.14, fixing
installation failures on Python 3.14.
4.64.1
(fix): Wrap python-version in quotes in generated GitHub CI workflow so versions like
^3.10 are not misinterpreted as 3.1 by the YAML parser.
4.64.0
(feat): Add omit_fern_headers configuration option. When enabled, Fern platform headers
(X-Fern-Language, X-Fern-SDK-Name, X-Fern-SDK-Version, X-Fern-Runtime,
X-Fern-Platform, User-Agent) are omitted from generated SDK requests.
4.63.6
(fix): Fix wire test generation for types with required fields missing from examples.
When an OpenAPI example omits required fields on a nested object type, the generated
test code now synthesizes reasonable default values (e.g., "" for strings, 1 for
integers, [] for lists) instead of emitting empty constructors like ClassName()
that cause Pydantic ValidationError at runtime.
4.63.5
(fix): Fix Python 3.14 compatibility by fully eliminating all pydantic.v1 imports from the
Pydantic V2 code path. The previous fix (4.55.4) replaced pydantic.v1.datetime_parse
but left other pydantic.v1 imports (typing utilities, json encoders, fields) that still
trigger the “Core Pydantic V1 functionality isn’t compatible with Python 3.14” warning.
All pydantic.v1 usages are now replaced with standard library equivalents
(typing.get_args, typing.get_origin, typing_extensions.Literal), Pydantic V2 APIs
(pydantic.fields.FieldInfo), and an inlined encoders_by_type dictionary.
4.63.4
(chore): Add concurrency configuration to generated CI workflow with cancel-in-progress: false
to prevent stacked runs from being cancelled when a newer run starts.
4.63.3
(fix): Make wire test datetime normalization type-aware. String-typed query parameters
that look like datetimes (e.g., created_after: str) are no longer incorrectly
normalized with .000 milliseconds. Only DATE_TIME-typed parameters are affected
by the datetime_milliseconds config.
4.63.2
(fix): Fix wire test datetime format mismatch. When datetime_milliseconds is false (default),
WireMock stubs are now stripped of .000 milliseconds to match the SDK’s default
serialize_datetime output. When true, test verification values include .000 to match
millisecond-precision output. Fixes wire test failures for APIs with datetime query parameters.
4.63.1
(fix): Fix socket client generation to use keyword arguments when calling construct_type.
4.63.0
(feat): Add datetime_milliseconds custom config option. When set to true,
serialize_datetime always includes millisecond precision in ISO 8601 output
(e.g., 2008-01-02T00:00:00.000Z instead of 2008-01-02T00:00:00Z).
Useful for APIs that require a fixed-width datetime format with fractional seconds.
Default behavior is unchanged.
4.62.4
(fix): Re-throw errors after logging for README.md and reference.md generation failures.
Documentation generation errors now break the generation flow so they are treated
as important to fix.
4.62.3
(fix): Fix dynamic snippets to include global headers in generated code examples.
Previously, required global headers (e.g., X-Organization-ID) configured via
x-fern-global-headers were missing from dynamic snippet output. Also fixes
header value lookup to use wire values instead of a non-existent property.
4.62.2
(chore): Improve error logging for reference.md generation failures. The generator
now logs the actual error message and stack trace instead of a generic
“this is OK” message, making it easier to diagnose generation issues.
4.62.1
(fix): SDK clients now catch pydantic.ValidationError during response parsing and
wrap it in ParsingError with the response body, headers, status code and cause. Previously,
validation errors from parse_obj_as would bubble up raw, preventing users from
inspecting the actual API response.
4.62.0
(feat): Add README.md and reference.md generation to the python-v2 SDK generator.
The v2 generator now produces README documentation with feature snippets
(installation, usage, timeouts, custom client, exception handling, raw responses,
websockets, custom sections) and endpoint reference documentation.
(chore): Format AST output with trailing commas in multiline function calls and
inline list/dict formatting for improved code readability.
4.61.5
(fix): Fix WebSocket client generation to respect pydantic_config.skip_validation: true.
Previously, socket clients always used parse_obj_as (full Pydantic validation)
regardless of the skip_validation flag. They now correctly use construct_type
(no validation) when the flag is enabled, matching the behavior of HTTP clients.