feat: add support for translating @ to at_ in variable names for TypeScript clients
Merged
CE
2mo ago+28+28+01234567890123456789-0-0-0123456789
I'm having the same issue as https://github.com/OpenAPITools/openapi-generator/pull/12171. This PR applies the same principe, but for TypeScript clients
Summary by cubic
Translate leading @ in OpenAPI property names to at_ for TypeScript clients to avoid collisions and duplicate type fields (e.g., @type becomes atType/at_type). Implemented in AbstractTypeScriptClientCodegen, so it applies to all TS client generators.
- Bug Fixes
- Map leading
@toat_intoVarNamewithinAbstractTypeScriptClientCodegen. - Respect
MODEL_PROPERTY_NAMING(e.g., camelCase vs original) when forming the final name. - Add tests for
typescript-fetchandtypescript-angularconfirming@id=>atId/at_id.
- Map leading