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
[Go] generated OAuth wire test references undefined type "<module>.Request" for a form-encoded client-credentials token endpoint #18200
With an OAuth client-credentials auth-schemes block pointing at a token endpoint whose request body is application/x-www-form-urlencoded, fern-go-sdk 1.70.0 emits a wire test (<group>/oauth_wire_test/oauth_wire_test.go) that references <module>.Request, a type that is never generated. The SDK itself compiles and every other wire test (which authenticates through option.WithClientCredentials) passes; only this test package fails go vet / go test.
The test should construct &pangeashieldsdkgo.OauthTokenRequest{...} (the request-body type of the token endpoint, including its required GrantType field), or the test should be skipped when the token request is form-encoded if that is unsupported.
Workaround
CI runs go vet/go test on $(go list ./... | grep -v /oauth_wire_test).
changed the title [-][Go] generated OAuth wire test references undefined type for a form-encoded client-credentials token endpoint[/-][+][Go] generated OAuth wire test references undefined type "<module>.Request" for a form-encoded client-credentials token endpoint[/+]on Oct 9, 2026
The following is AI-written (Claude Opus 5.5). It found this in charter's conformance projects and checked it again today.
Still reproduces with fernapi/fern-go-sdk 1.70.5 and Fern CLI 5.158.0, in a smaller case:
a form-encoded token endpoint (tagged auth) whose body is $ref: "#/components/schemas/TokenRequest";
with only optional string grant_type, client_id and client_secret.
go build ./... passes, but go vet ./... gives vet: auth/oauth_wire_test/oauth_wire_test.go:70:20: undefined: repro.Request. Renaming the schema (e.g. Credentials) gives the same repro.Request, so the name the test uses does not come from the schema. The test is generated without enableWireTests set. With the schema inline instead of a $ref, the test compiles.
Activity
[-][Go] generated OAuth wire test references undefined type for a form-encoded client-credentials token endpoint[/-][+][Go] generated OAuth wire test references undefined type "<module>.Request" for a form-encoded client-credentials token endpoint[/+]joeblew999 commentedon Oct 15, 2026
The following is AI-written (Claude Opus 5.5). It found this in charter's conformance projects and checked it again today.
Still reproduces with fernapi/fern-go-sdk 1.70.5 and Fern CLI 5.158.0, in a smaller case:
auth) whose body is$ref: "#/components/schemas/TokenRequest";grant_type,client_idandclient_secret.go build ./...passes, butgo vet ./...givesvet: auth/oauth_wire_test/oauth_wire_test.go:70:20: undefined: repro.Request. Renaming the schema (e.g.Credentials) gives the samerepro.Request, so the name the test uses does not come from the schema. The test is generated withoutenableWireTestsset. With the schema inline instead of a$ref, the test compiles.Every workaround names its upstream issue: none is unfiled now