1.22.4
(fix): Fix wiremock port collisions when running wire tests in parallel. The docker-compose
configuration now uses ephemeral ports (0:8080) instead of fixed port 8080, and the
generated test code reads the WIREMOCK_PORT environment variable to discover the
dynamically assigned port at runtime.
1.22.3
(fix): Fix OAuth form URL encoding to respect custom MarshalJSON methods. The form URL encoding
now marshals the request to JSON first, then converts to form data, ensuring fields like
grant_type that are added via custom MarshalJSON are included in the request body.
1.22.2
(fix): Make OAuth wire tests dynamic to support different SDK structures. The OAuth test generator
now extracts service information (client accessor path, method names, field names) directly
from the IR, enabling wire tests to work across different OAuth configurations without
hardcoded assumptions.
1.22.1
(fix): Add ‘v’ prefix to sdkVersion in metadata.json to follow Go module versioning conventions.
1.22.0
(feat): Generate error_codes.go per-namespace for multi-namespace Go SDKs. Each namespace now has its
own error_codes.go file containing only the error codes and error types from that namespace,
rather than a single global file with all errors.
1.21.8
(fix): Add request scoping to wire tests using X-Test-Id header. Each test now sends a unique
header that is used to filter WireMock request verification, enabling safe concurrent
test execution without interference between tests.
1.21.7
(chore): Fix nil check in caller
1.21.6
(chore): Add GO_V2_PATH environment variable support for configurable v2 binary path during local development and testing
1.21.5
(fix): Fix duplicate test function generation in wire tests. When multiple endpoints map to the
same test function name, subsequent occurrences now get numeric suffixes (e.g., Test2, Test3)
to avoid Go compilation errors while preserving all test coverage.
1.21.4
(chore): Add sdkVersion as a top-level field in the generated metadata.json file.
1.21.3
(fix): Fix multi-URL environment resolution to fall back to client-level environment when
per-request environment is not specified. This ensures endpoints correctly resolve
their base URL when the environment is set at client construction time.
1.21.2
(fix): Fix retry logic to reset request body before each retry attempt.
1.21.1
(fix): Fix OAuth token handling for optional expires_in field. Use pointer conversion for optional
request fields and check ExpiresIn as pointer type with default fallback.
1.21.0
(feat): Add support for multi-URL environments via x-fern-server-name extension. APIs with multiple
base URLs per environment can now route different endpoints to different base URLs automatically.
The SDK generates a named Environment struct with fields for each base URL, and endpoints
resolve their base URL using the ResolveEnvironmentBaseURL function.
1.20.2
(fix): Fix OAuth token fetching to use GetOrFetch instead of GetToken.
1.20.1
(fix): Improve OAuth token fetching with concurrency protection and better error handling.
Multiple concurrent requests now share a single token fetch instead of each triggering
their own. Added nil pointer checks for OAuth responses and a 1-hour default expiry
fallback when the server doesn’t provide an expires_in value.
1.20.0
(feat): Add errorCodes config option with values per-endpoint or global. The global mode (default)
generates a shared error_codes.go file for all errors. The per-endpoint mode generates error
handling code inline for each endpoint, which is more robust for namespaced APIs or APIs where
different endpoints have different error schemas for the same status code.
1.19.0
(feat): Add OAuth token fetching support. The SDK now automatically fetches and caches OAuth tokens
using client credentials when configured. Tokens are refreshed automatically when expired.