Two smaller findings from the same customer-SDK review. Filing together since both are "the generated output is right but not as good as it could be", and both are unreachable from config today.
1. Error bodies are any for OpenAPI inputs
Fern types error bodies for Fern-definition inputs — seed/go-sdk/errors produces:
type BadRequestError struct {
*core.APIError
Body *ErrorBody
}
But an OpenAPI spec whose error response is a named $ref produces:
type BadRequestError struct {
*core.APIError
Body any
}
Our overlay attaches an explicit 400 carrying $ref: '#/components/schemas/PlaidError', and PlaidError is a named schema present in the SDK as plaid.PlaidError. Callers still get map[string]any and must string-index error_code / error_type.
Things I ruled out:
- Not caused by
default coexisting with explicit codes — removing the default response via overlay changes nothing.
- Not a missing-schema problem —
PlaidError is generated as a type.
- I could not find any
x-fern-* extension for naming an error schema.
Expected: an OpenAPI error response pointing at a named schema should produce Body *ThatType, matching the Fern-definition behavior.
2. Group names ignore domain acronyms, and there's no override
smart-casing: true handles a fixed initialism list but not domain acronyms, and x-fern-sdk-group-name is taken verbatim. Measured on 1.57.2:
| supplied |
generated |
api_key |
APIKey ✅ |
url_thing |
URLThing ✅ |
oauth |
Oauth ❌ |
o_auth |
OAuth ✅ (workaround) |
fdx |
Fdx ❌ |
f_d_x |
FDx ❌ |
cra_report |
CraReport ❌ |
So OAuth is reachable only by misspelling the group as o_auth, and FDX / CRAReport / EWAReport are not reachable at all. We shipped client.OAuth via the workaround and left client.Fdx / client.CraReport as-is.
Expected: either a configurable acronym list (e.g. additionalAcronyms: [FDX, CRA, EWA]) or a per-group casing override. The workaround is obscure enough that a future reader would likely "fix" the spelling and silently regress it.
Two smaller findings from the same customer-SDK review. Filing together since both are "the generated output is right but not as good as it could be", and both are unreachable from config today.
1. Error bodies are
anyfor OpenAPI inputsFern types error bodies for Fern-definition inputs —
seed/go-sdk/errorsproduces:But an OpenAPI spec whose error response is a named
$refproduces:Our overlay attaches an explicit
400carrying$ref: '#/components/schemas/PlaidError', andPlaidErroris a named schema present in the SDK asplaid.PlaidError. Callers still getmap[string]anyand must string-indexerror_code/error_type.Things I ruled out:
defaultcoexisting with explicit codes — removing thedefaultresponse via overlay changes nothing.PlaidErroris generated as a type.x-fern-*extension for naming an error schema.Expected: an OpenAPI error response pointing at a named schema should produce
Body *ThatType, matching the Fern-definition behavior.2. Group names ignore domain acronyms, and there's no override
smart-casing: truehandles a fixed initialism list but not domain acronyms, andx-fern-sdk-group-nameis taken verbatim. Measured on 1.57.2:api_keyAPIKey✅url_thingURLThing✅oauthOauth❌o_authOAuth✅ (workaround)fdxFdx❌f_d_xFDx❌cra_reportCraReport❌So
OAuthis reachable only by misspelling the group aso_auth, andFDX/CRAReport/EWAReportare not reachable at all. We shippedclient.OAuthvia the workaround and leftclient.Fdx/client.CraReportas-is.Expected: either a configurable acronym list (e.g.
additionalAcronyms: [FDX, CRA, EWA]) or a per-group casing override. The workaround is obscure enough that a future reader would likely "fix" the spelling and silently regress it.