Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support idomatic code generation across more target platforms #104

Open
PeterJCLaw opened this issue Dec 18, 2024 · 2 comments
Open

Support idomatic code generation across more target platforms #104

PeterJCLaw opened this issue Dec 18, 2024 · 2 comments

Comments

@PeterJCLaw
Copy link

In some languages, the generated code converts from e.g: snake_case to camelCase or PascalCase to fit with standard language conventions, however this does not appear to be the case universally. I realise that not all languages have universal conventions and that just changing this would be a breaking change for existing consumers, however the result at the moment is that in e.g: TypeScript linters complain about the generated code. If this code was used only within generated files it'd be easy to add exceptions however for things like API surfaces or enums which can be used anywhere it's harder to precisely exempt them without creating toil for developers.

Ideally perhaps the generated code would all conform to the most common styles for the target languages, though perhaps supporting customisation of the style as part of the config would enable flexibility for those using the generated code.

Note that this would need to be a purely surface thing -- the underlying schemas would need to still match the upstream, so a conversion might be needed. I'm not sure what to suggest happens if there's a conflict (e.g: an event which has both foo_bar and fooBar in it), though it may be sufficient to error about such cases when RudderTyper inspects the schema.

@contributor-support
Copy link

Thanks for opening this issue! We'll get back to you shortly. If it is a bug, please make sure to add steps to reproduce the issue.

@TWiStErRob
Copy link

I think the conflict problem already happens. For example with #94 because the mapping is irreversible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants