Skip to content

Support idomatic code generation across more target platforms #104

@PeterJCLaw

Description

@PeterJCLaw

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions