Component
CLI / OpenAPI importer
Priority
P1 — the imported definition can generate uncompilable SDK source.
Bug description
An OpenAPI document that defines both:
- an OAuth2 security scheme with non-empty scopes, and
- a component schema named
OAuthScope
produces two root types named OauthScope and OAuthScope. The former is synthesized by the importer with a hard-coded name. Their case-only distinction collides in generated file paths, producing invalid TypeScript on a case-insensitive filesystem and case-only paths on a case-sensitive checkout.
Expected: preserve the user-defined OAuthScope and give the synthetic enum a non-colliding name.
Actual: the two declarations converge into corrupt generated source.
A minimal reproducer and regression fix are ready in an accompanying PR.
Versions
- Fern CLI 5.89.0 reproduces the issue.
- TypeScript SDK generators 3.85.2 and 3.87.4 both reproduce it.
- Current
fern-api/fern main still hard-codes OauthScope without deconfliction.
Workaround
Adding x-fern-type-name to rename the user component avoids the collision, but unnecessarily changes the user's public SDK model name.
Contributing
Yes.
Component
CLI / OpenAPI importer
Priority
P1 — the imported definition can generate uncompilable SDK source.
Bug description
An OpenAPI document that defines both:
OAuthScopeproduces two root types named
OauthScopeandOAuthScope. The former is synthesized by the importer with a hard-coded name. Their case-only distinction collides in generated file paths, producing invalid TypeScript on a case-insensitive filesystem and case-only paths on a case-sensitive checkout.Expected: preserve the user-defined
OAuthScopeand give the synthetic enum a non-colliding name.Actual: the two declarations converge into corrupt generated source.
A minimal reproducer and regression fix are ready in an accompanying PR.
Versions
fern-api/fernmain still hard-codesOauthScopewithout deconfliction.Workaround
Adding
x-fern-type-nameto rename the user component avoids the collision, but unnecessarily changes the user's public SDK model name.Contributing
Yes.